About Me

I am a computer programmer. I do programming professionally and for a laugh.

yeah but actually

Technical stuff on programming, java, DSLs, etc...

Tuesday, 4 April 2023

Brave amateurs

A quote I like from the film 300:

‘They shout and curse, stabbing wildly—more brawlers than warriors. They make a wondrous mess of things. Brave amateurs… they do their part.’”

Monday, 30 August 2021

Everything is Going to be All Right by Derek Mahon


How should I not be glad to contemplate

the clouds clearing beyond the dormer window

and a high tide reflected on the ceiling?

There will be dying, there will be dying,

but there is no need to go into that.

The poems flow from the hand unbidden

and the hidden source is the watchful heart.

The sun rises in spite of everything

and the far cities are beautiful and bright.

I lie here in a riot of sunlight

watching the day break and the clouds flying.

Everything is going to be all right.


Monday, 1 March 2021

Computer latency scaled

We all love to talk about Architecture - micro services, message passing, event streams, sow, etc. It all boils down to the below. 

Can you fit your work in the cache or do you regularly fall off to the main memory? What is the penalty for calling another service? Or can it be faster than accessing the disk? You should be able to talk about these roughly for your application. 

If you are into computers, best to know this stuff - 

p.s. Also, this is why you should use an ArrayList over a LinkedList most days


System Event Actual Latency Scaled Latency
One CPU cycle 0.4 ns 1 s
Level 1 cache access (8 KB to 128 KB) - 128 KB 0.9 ns 2 s
Level 2 cache access (256KB to 8MB) - 512 KB 2.8 ns 7 s
Level 3 cache access ( 4MB to 50MB) - 3 MB 28 ns 1 min
Main memory access (DDR DIMM) ~100 ns 4 min
Intel Optane memory access <10 μs 7 hrs
NVMe SSD I/O ~25 μs 17 hrs
SSD I/O 50–150 μs 1.5–4 days
Rotational disk I/O 1–10 ms 1–9 months
Internet call: San Francisco to New York City 65 ms 5 years
Internet call: San Francisco to Hong Kong 141 ms 11 years

(don't worry too much about the numbers not 100% matching with the above - different times, different architectures etc..)

execute typical instruction 1 ns 1 ns
fetch from L1 cache memory 0.5 ns 0.5 ns
branch misprediction 5 ns 5 ns
fetch from L2 cache memory 7 ns 7 ns
Mutex lock/unlock 25 ns 25 ns
fetch from main memory 100 ns 100 ns
send 2K bytes over 1Gbps network 20,000 ns 20 μs
read 1MB sequentially from memory 250,000 ns 250 μs
fetch from new disk location (seek) 8,000,000 ns 8 ms
read 1MB sequentially from disk 20,000,000 ns 20 ms
send packet US to Europe and back 150,000,000 ns 150 ms

Gauchos and the gauleiters

I read this article the other day in nytimes.
Gaucho1868b.jpg
See ** for copyright

https://www.nytimes.com/2018/06/12/magazine/the-strange-case-of-the-missing-joyce-scholar.html

It talks about a man who spent decades of his life studying Ulysses. One of the greatest novels of our times, A novel version of the tv series Lost*, where Joyce set a requirement for any article about it to include the phrase
"I put in so many enigmas and puzzles that it will keep the professors busy for centuries arguing over what I meant.” 
This part I found particularly interesting -
He told me a story, a parable, really. “There are the gauchos and the gauleiters,” he explained. It’s a mixed metaphor, but one that nicely captures his view of the world and of Joyce scholars too. Gauchos, I knew, were Argentine cowboys, but gauleiters (pronounced gow-lieders), I learned, were municipal bureaucrats in the early Nazi government; in other words, menacing apparatchiks. 
Across the great landscape of understanding are the gauchos, at once both rugged and audacious. “They roam the pampas,” he told me, taking care of the vast terrain by knowing its vastness intimately. Meanwhile back at the edge of the pampas, in civilization, are the gauleiters. They are everywhere, they are busy, they are overwhelming. The gauchos are few — iconoclasts like himself, or the occasional Joyce fanatic like Jorn Barger, a polymath who in the earliest days of the internet wrote a lot of brilliant Joyce analysis on his weblog (a word he also coined). But, Kidd said, it doesn’t matter. In the end, the victory always goes to the gauleiters because of their peevish concern for “administrative efficiency.”
* the author manages to simultaneously lose a generation by talking about Ulysses and pisses of a large number of Ulysses fans by comparing it to Lost Island

** By Courret Hermanos Fotogs., Lima, Peru. - This image is available from the United States Library of Congress's Prints and Photographs division under the digital ID ppmsca.19409. This tag does not indicate the copyright status of the attached work. A normal copyright tag is still required. See Commons:Licensing for more information., Public Domain, Link

Saturday, 18 February 2017

Bullshit fatigue

Usual Friday morning banter at work talking about the news that some "retired vice-admiral turns down US national security adviser offer".

"How is this even possible?" was my argument, "nobody checked with the guy?"

As I was ranting about how the amount of bullshit going around is bothering me, especially with the recent political landslides and very weird events in countries like Turkey, an esteemed colleague came up with the much needed diagnosis.

"May be you are suffering from bullshit fatigue?"

Spot on. I am suffering from bullshit fatigue...


Highland Cattle bull.jpg
By BrianForbes - flickr.com, CC BY-SA 2.0, Link

Bullshit Fatigue:- A neurological condition where bullshit receptors in one's brain becomes over stimulated. Symptoms can vary from
  • Feelings of rage, rather than the customary roll of the eye induced by delivery of false or incomplete information with a blast of absolute conviction (a.k.a. bullshit).
  • Extreme cynicism
  • Weltschmerz

Saturday, 21 January 2017

That looks great. Just one thing: get rid of the duck.


Rubber duckies So many ducks.jpg
By gaetanlee - http://www.flickr.com/photos/gaetanlee/298160434/, CC BY 2.0, Link

I actually pulled a 'looks great, just get rid of the duck colour on the text' today and this is what it is:-

... It was well known that producers (a game industry position roughly equivalent to project manager) had to make a change to everything that was done. The assumption was that subconsciously they felt that if they didn't, they weren't adding value. 
The artist working on the queen animations for Battle Chess was aware of this tendency, and came up with an innovative solution. He did the animations for the queen the way that he felt would be best, with one addition: he gave the queen a pet duck. He animated this duck through all of the queen's animations, had it flapping around the corners. He also took great care to make sure that it never overlapped the "actual" animation. 
Eventually, it came time for the producer to review the animation set for the queen. The producer sat down and watched all of the animations. When they were done, he turned to the artist and said, 
"That looks great. Just one thing: get rid of the duck."

Tuesday, 18 October 2016

The Grapes of Wrath


By Jacket design by Elmer Hader. - Scan via Heritage Auctions Lot. Cropped from the original image., Public Domain, https://commons.wikimedia.org/w/index.php?curid=91863504

I read grapes of wrath recently and the below was impossible to pass.

Disclaimer: alcohol use is a major cause of death, I know it is not even Thursday yet and stop reading my blog if you are underage.

"... And always, if he had a little money, a man could get drunk. The hard edges gone, and the warmth. Then there was no loneliness, for a man could people his brain with friends, and he could find his enemies and destroy them. Sitting in a ditch, the earth grew soft under him. Failures dulled and the future was no threat. And hunger did not skulk about, but the world was soft and easy, and a man could reach the place he started for. The stars came down wonderfully close and the sky was soft. Death was a friend, and sleep was death’s brother. The old times came back—a girl with pretty feet, who danced one time at home—a horse—a long time ago. A horse and a saddle. And the leather was carved. When was that? Ought to find a girl to talk to. That’s nice. Might lay with her, too. But warm here. And the stars down so close, and sadness and pleasure so close together, really the same thing. Like to stay drunk all the time. Who says it’s bad? Who dares to say it’s bad? Preachers—but they got their own kinda drunkenness. Thin, barren women, but they’re too miserable to know. Reformers—but they don’t bite deep enough into living to know. No—the stars are close and dear and I have joined the brotherhood of the worlds. And everything’s holy—everything, even me."

Saturday, 15 October 2016

The best color for the bike shed

Bicycle shed.JPG
By SeppVei - Own work, CC0, Link

I watched a video the other day of a chap talking about the bike shed effect. The idea goes around a group discussing building a nuclear plant. As the subject is vastly complicated, not everyone can get their head around the technicalities so most of the team is quiet. But when the subject comes to the planning of the bike shed that is mandatory for every nuclear plant, the room erupts into a massive discussion because everyone involved is an expert on bike sheds.

We do see the bike shed effect in software development too. Discussions around abstractions, algorithms or performance of an application, is usually mellow.

But when it comes to the choice of ide, the non trivial choice betweens tabs vs spaces or whether the team should use swim lanes or epics everyone is ready to karate kick each others' pets.

That is a good bike shed btw. The colour is not quite right though.

Thursday, 15 September 2016

Nothing was ever created by two men

EastOfEden.jpg
By Source, Fair use, https://en.wikipedia.org/w/index.php?curid=19559604

I am reading East of Eden and just came across this awesome prose;
Our species is the only creative species, and it has only one creative instrument, the individual mind and spirit of a man. Nothing was ever created by two men. There are no good collaborations, whether in music, in art, in poetry, in mathematics, in philosophy. Once the miracle of creation has taken place, the group can build and extend it, but the group never invents anything. The preciousness lies in the lonely mind of a man.
Programming being a semi-art form, needs this magic too. All that process stuff, agile, tdd etc 'the good collaborations' help with the routine bits of application programming.

The real magic however requires the 'the individual mind and spirit'

Sunday, 11 September 2016

Estimate Bullying

Saynotobullying.jpg
By Andrevruas - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=37657451

The process by which you are asked to estimate a piece of work and then bullied by various means to back down your estimate.

Usually goes like this;

‎Bill Lumbergh: Hey what's happening? Aahh, now, are you going to go ahead and estimate this piece of work
You: Well, these are a very rough description of task/stories etc. If we roughly estimate those and add them up, this whole thing will take X weeks.
‎Bill Lumbergh: Yeah, that's it. Great. What can we get next week?

If the victim is features, that may be fine. If you are pushed into a total hacking frenzy, the whole thing becomes a bit boring.

Stop bullying

Followers