Software Development Ego

30-Aug-2021

Have you ever seen this?

"I'm an egomaniac, and when I think of a change you could make to code then you have to make it, and also I'm insecure about it so I want to turn it into an organizational standard."


What happened last year?

20-Aug-2021

I blinked and now the streets are empty and everybody has to wear masks.


Bad Job ABC

28-Jul-2020

Big dick move from the host of Q and A Here it is

Gigi was trying to talk, and the other guys kept putting words in her mouth. What kind of fair question is, "Why do you want people to die?"

Obviously, she's trying to describe some trade-off between two evils. The host needed to stop accusing her of being evil and let her explain the other side of the trade-off.

Gigi kept being interrupted, and because she was continuously being interrupted, her explanation ended up vague and low-fidelity. Her presented argument winds up being a bunch of impossible to validate claims like, "I don't want people to die", and some vague explanation that perhaps lock-downs cause more net suffering and death than the Covid deaths.

Maybe that's the entirety of her argument? Maybe she doesn't have stronger content, analysis or forecasts to put forward than her vague "I reckon". If this is the case I could never endorse her.

But since dickhead kept saying, "YEAH BUT WHY DONT YOU HAVE ANY EMPATHY FOR HUMAN LIFE?", I guess we will never know.


Black Lives Matter

25-Jun-2020

I must draw your attention again to the way in which people of European descent historically treated Non-Europeans. The colonising nations, the Spanish, the Dutch and particularly the English tore away great wealth from lands far from European shores. The indigenous peoples of so many lands have been exploited, robbed and enslaved for the sake of enriching and empowering Europeans. If you are not familiar with this history, this is not a bad place to start.

Though I was not alive to take part in that exploitation, I still reap the benefits from seeds sown in the sweat and blood of those exploited folk. Because of this I can see that from a certain perspective, it is logical to hate or envy me, solely because I have been born both male and white. Just so, another perspective: It is not conducive to happiness to wallow in guilt or self-hatred because of this advantage, and so myself and others born like me are apt to form clever defense mechanisms against this. We form defense mechanisms such as entitlement, racism, or just generally not thinking about it.

I think that we must all reject these simple modes of thinking and the protests in Australia show that I am not alone. These protests are an announcement of a generation rejecting the values and behaviours of the generation before, and so those rotten values are to be cast aside and replaced... But with what?

There can be no equality. For there to be an equality, would I not need to give up the advantage that I was born with? How could I give this up, when my advantage is inside me as much as out? My advantage is an education fostered by an educated family who valued it and instilled the same value into me. That is a gift that can only be given to children, not own-minded adults who have already decided who they are.

The only thing that I can see must be done, is we must accept that we have an intrinsic advantage, and then use that advantage to leverage. We must accept, that Australians born with a disadvantage, especially Aboriginal Australians, should be given unequal access to our pooled resources to make up for that disadvantage. And we should do this forever obviously, because equality isn't possible.

We need to change our culture, and more importantly, our institutions, to accept our inequality and value reducing it. We need institutions, because no natural market force will balance out inequality by itself, or it already would have.

If other people are getting more of the pie, then perhaps I will end up with a less. But if the key to reducing inequality is education, and I find myself in a nation of thinkers and creators... In the end, I think, I will be happier for it.


Creating a Sprite Rotation Map with Gimp

25-Feb-2020

So, I used the Gimp Script-Fu stuff, and it's hard/easy. The easy part, thankfully is using it. Like any Lisp language it's ridiculously powerful and defining new syntax is cheaper than chips. The hard part is the lack of quality documentation on it's use/api.

The documentation on the gimp website is mostly just a Scheme[1] tutorial which doesn't really give enough information on how to use it properly, and while browsing through the inbuilt script-fu console will be your go-to on working out how to do something, there is some vagueness on questions like "How does script-fu implement image layers?[2]", "What is a drawable?[3]", "What is the difference between a drawable and a layer?[4]"

So here is the important part. The code will only work if your image is a square big enough so your image can rotate without losing the edges, but it will create a very wide image with 360 different rotation angles on it. (This was all I needed for the project I was using, so I couldn't be bothered to make it dynamic. If anyone makes an improved version of this, poke me so I can link to it.)

;;As scheme doesn't have a Pi function, I just used the magic number for 2Pi
(define (degrees->radians degrees)
  (* 6.28318530717959 (/ degrees 360.0)))

(define (sprite-rotation-map inImage inLayer)
  ;;Declare a bunch of variables
  (let* ((width (car (gimp-image-width inImage)))
         (mid (/ width 2))
         (degrees 1)
         (newlayer 0))

  (gimp-image-resize inImage (* 360 width) (car (gimp-image-height inImage)) 0 0)

  ;;Draw many rotated boats
  (while (< degrees 360)
    ;;Copy the first image layer and add the copy to the image
    (set! newlayer (car (gimp-layer-copy inLayer TRUE)))
    (gimp-image-add-layer inImage newlayer -1)
    ;;Rotate the layer to the correct angle
    (gimp-drawable-transform-rotate newlayer (degrees->radians degrees) FALSE mid mid TRANSFORM-FORWARD INTERPOLATION-LINEAR TRUE 3 TRANSFORM-RESIZE-CLIP)
    ;;Move the layer to the correct position
    (gimp-layer-set-offsets newlayer (* degrees width) 0)
    ;;Increment the iterator
    (set! degrees (+ 1 degrees)))))

;;Register the function so it's accessible from the Filters menu
(script-fu-register "sprite-rotation-map"
      "<img />/Filters/_danielkeogh.com/_SpriteRotationMap"
      "Multiple smaller copies of image arranged in a spiral"
      "Daniel Keogh"
      "(c) Daniel Keogh"
      "Feb 2012"
      "RGB*"
      SF-IMAGE "Image"  0
      SF-DRAWABLE "Drawable" 0)
`Feel free to copy this code and abuse it however you will. Credit me if you want, but I'm not that hung up on credit anyways.

Peace out.

[1]: For those not in the know-how, Scheme is a dialect of a programming language called Lisp.

[2]: Each layer is represented by an enumeration, which pretty much means some positive integer. The bottom layer is 0, and respective layers are 1+ on top of that.

[3]: A "drawable" is one of those funny boxes surrounded by dotted lines that show's the area that can be drawn on for a particular layer/image. Layers are "drawable" by default, but only the part of the layer that has an image on it.

[4]: As a newb, I'm not totally sure about this. All layers are drawable's, but possibly not vice versa. What I can say before, is if you manipulate the contents of a drawable, you're only manipulating the area inside the little selector box thingy, but if you manipulate a layer, it can affect the whole image.


Fun

10-Jun-2019

I've been revising some computer science concepts.

The Standford Programming Paradigms lecture series from academic earth is good. It is worth memorising Heaps Algorithm for generating permutations.

I launched this project. I'm not sure if I'll ever need it, but it is certainly fun.


How to learn Programming

10-Jun-2019

I was talking to a human today about the journey to become a programmer. I think I set them up for success as I told them to learn the fundamental data structures and algorithms, learn a few languages (especially SQL), and keep up to date on acculturating platforms like reddit, hacker news and lobsters.

This is how I learned to program so it is a kind of truth, but it is only one of the many paths. What is the strongest path? I don't know. Memes suggest that learning c and c++, then focusing on machine learning is the way to go. Or becoming a javascript developer.

I think that learning Lisp will make you strong, but what have I done with it? (Nothing notable.)


Such arrogance

28-Mar-2019

It was deleted, but now it is back. I guess I have to try harder. (Nee-naw-nee-naw It's the Internet Police).

EDIT: Gottem.


Wikipoodia

05-Mar-2019

I found someone's self-written Wikipedia last night. Guy thinks he is a Jazz musician. Watch this space.


Music, Life and Everything

05-Mar-2019

I want to try writing some train of thought and seeing where it goes. I feel that a thing that is not easily discussed is values. I recently read this article written by Tony Abbott on why he left the priesthood, and was struck by what an eloquent writer he is. This is not something that I was expecting as the general discourse that I have seen from him and his companions in the television media over the last decade has been appallingly low-brow. (And so seems to be the impression of Question Time in the Australian Parliament.)

Given that he is in fact an excellent writer, I must assume that in his own way, he is an intelligent person. This road of thinking leads down several paths, and questions, such as, "How can an an intelligent person continuously make choices that I disagree with?", "How does Mr Abbott manage to hold highly cognitively dissonant ideas without showing any signs of internal conflict?", and "Why would a person whom cares enough about morality to try entering the priesthood focus on policies that funnel money from the general Australian population into the hands of the already wealthy?".

I infer from this that he is not mad, or stupid, or even evil, simply that he holds a entirely distinct set of values from myself.

But what are those? Expressing what you believe to be your values (note the careful choice of words), can be fraught with ambiguity and in-determinations.

Once I was asked by an elder colleague as part of a workshop to describe what it is that I value. At the time I rather foolishly said, "I value equality of opportunity." (This is not intrinsically foolish, but in context we were supposed to be discussing which kinds of carrots we find motivating our work.) And even though I said this, I had not really thought through of what a world could really look like with equality of opportunity, or what the consequences of this could be. Given humanities proclivity towards zero sum games, a world like this might be highly competitive and lack diversity.

Such complexity. Trying to introduce something which feels like a good idea may backfire severely (just as so many of our Governments policies seem to). Is it even possible to simply express ones own values with clarity, let alone compare them with the strange-loop in your head that is somebody else's?

And does Tony like Jazz?