Christian Heilmann

You are currently browsing the archives for the General category.

Archive for the ‘General’ Category

Links, 2, 3, 4: Accessibility

Tuesday, November 8th, 2022

Here are some recent links on the topic of accessibility you might enjoy and learn something from:

Removing the camera overlay icon on images in Microsoft Edge

Friday, November 4th, 2022

The more options menu of the overlay

If you use Microsoft Edge, you get a camera icon when you hover your mouse over any image:

Camera icon when you hover over an image

This is a great tool for users as it allows them to do a visual search in a sidebar for that image.

Interaction showing more related images in a sidebar

During local development, the icon appears on images, too, but the results don’t show up. That means it interferes with your design and doesn’t work.

If you hover longer over the icon, you can access an overflow menu `…` which allows you to hide the icon for this site, to always hide it, to go to the settings and to give feedback.

More options menu on hover

You can also go to the browser settings edge://settings/appearance/visualSearch to add sites you don’t want to see visual search by hand.

The settings page for visual search

Reminder: JSON.stringify can create Multi-line, formatted and filtered strings from JSON

Friday, October 28th, 2022

demo output of the examples shown here in the browser console

You can use `JSON.stringify()` to turn a JSON object into a string.

let obj = {"a": 1, "b": 3, "c": "boo!"};
console.log(JSON.stringify(obj))

This results in a single line string:

{"a":1,"b":3,"c":"boo!"}

However, you can also set two optional parameters, a filtering array or callback method and an indentation parameter. Setting the indentation to four, for example, creates a multi line string with 4 spaces indentation:

let obj = {"a": 1, "b": 3, "c": "boo!"};
console.log(JSON.stringify(obj, false, 4))

Output:

{
    "a": 1,
    "b": 3,
    "c": "boo!"
}

If instead of spaces you want tabs, you can also defined the indentation parameter as a string:

let obj = {"a": 1, "b": 3, "c": "boo!"};
console.log(JSON.stringify(obj, false, "\t"))

Output:

{
	"a": 1,
	"b": 3,
	"c": "boo!"
}

Or any other string:

let obj = {"a": 1, "b": 3, "c": "boo!"};
console.log(JSON.stringify(obj, false, "xxx"))

Output:

{
xxx"a": 1,
xxx"b": 3,
xxx"c": "boo!"
}

You can define an array of keys you want to show to filter the outcome:

let obj = {"a": 1, "b": 3, "c": "boo!"};
console.log(JSON.stringify(obj, ['a','c'], 4))

Output:

{
    "a": 1,
    "c": "boo!"
}

And you can write a filtering callback function that gets applied to the JSON object. For example, to only allow for numbers to show:

const onlyNumbers = (key,value) => { 
  return (typeof value === 'string')  ? undefined : value 
}
let obj = {"a": 1, "b": 3, "c": "boo!"};
console.log(JSON.stringify(obj, onlyNumbers, 4))

Output:

{
    "a": 1,
    "b": 3
}

You can see more examples on MDN .

Whilst I like these options, it always feels weird to me when a method allows for different values to determine what to do. Having the replacer either be an array or a callback and the spaces option be a number or a string feels confusing. What do you think?

The Developer Advocacy Handbook is now available as an eBook on Leanpub and Amazon Kindle

Thursday, October 27th, 2022

People often asked me if I can make the Developer Advocacy Handbook available as an eBook to read on their devices. When Jens Oliver Meiert also asked me I told him there were no immediate plans, so he took on that task and converted the book. You can now purchase the eBook either on Amazon Kindle or on Leanpub.

Book listing on Leanpub

As a reminder, here is what it is all about:

This handbook will get you on the way to be a great developer advocate for any product or company. Naturally, your approach may need tweaking for different markets and audiences—and in accordance with your own personality—but the main principles are the same for everybody and anywhere in the world. Developer Relations is a rather new market and there are many confusing messages out there what it means to do this job, In this book, the author documented 15 years of Developer Advocacy and how to deal with the demands of the job. Whether you are new to the job, or you feel unhappy in your current role, here you’ll learn how to get started the right way. For people on the job, it is a great way to remind yourself what’s important.

Unless you’re in the mafia, your company isn’t your family

Thursday, October 6th, 2022

Dedication to your employer is a tradition in some cultures. My father was a dedicated coal miner and when the mine closed up he became a factory worker. He worked 40+ years in that factory in three shifts. He kept complaining about “those up there” in the hierarchy and yet the company was a big part of his life. He was always interested in what the company did even long after he retired.

One of the most surprising things I’ve seen him do happened when the company was in dire straits. They offered him a lump sum payment to go into earlier retirement. My father wasn’t someone dedicated or interested in math. But he took a pen to paper and calculated his odds. He found out that if he went on unemployment benefit for the remaining time he had more money after tax. So he got himself fired. I was very proud of my old man that day.

What about employer dedication in tech?

Now, what about our lives when it comes to our relationships with our employers? As a developer or the people surrounding them you live in a ridiculously fast paced environment. Keeping people for more than two years seems to be tough and for even longer is a rarity. I’ve always dedicated myself to my employers and I stayed on average more than four years in all my jobs. I’m weird. Maybe that’s a bias I inherited from my family but I always wanted to stay for the long term.

If you feel supported and your job nurtures, challenges and interests you, time can fly by quickly. And it feels good to reap the rewards of the early work you did years later. Seeing structures and processes in the company improve feels great. Seeing your products go live, take on momentum and become a household name is even better. Seeing people you hired or recommended improve and get promoted is also incredibly rewarding.

On the flipside, I also often caught myself staying in a job too long. I wanted to see a product come to fruition or a team to get what they deserved even if everything was against it. And it never played out. Sometimes you need to count your losses and realise that you won’t finish what you started. Often your doggedness is also the reason why the product isn’t getting done. You stopped being flexible and thus halted, for example, a possible incremental roll-out.

We got spirit, yes we do! Wait, do we have to?

Being dedicated to your company is a great thing. It often means that you don’t need to get lots of rewards, free stuff or perks. You already feel that your contribution is appreciated and that’s a very basic human need.

I always felt it getting weird though when company dedication and especially brand adoption is seen as a given. For example when people and companies bang on about the company being “a family”. This is rampant in US companies and I suppose it is a spill over from cheerleading and pep rallies in high school. I remember standing with my UK team at a Yahoo meeting in the Silicon Valley when everyone around us did the “yahoo yodel” and high fived without abandon. I also remember the almost physical pain on the faces of my colleagues as it did feel surreal to us.

We were proud of working there, and we loved being part of a big and impactful product. But no, this wasn’t a family gathering and nowhere in our contracts were we asked to do a song and dance when the company name is mentioned. Many a contract would have stayed unsigned if that had been the case.

Almost every company has a clever name for its employees. It gives a fuzzy feeling being part of a cool group rather than “wage drone number 1394”. This works and is fun to a degree, but it can come across tone deaf when things go wrong.

Take the letter that the CEO of Twilio released last month. A message that announced they cut 11% of their workforce kept talking about “Twilions” instead of employees. Imagine how this must feel for those who lost their jobs. Not only are you up for the chop, but you’re also kicked out of the cool family of “Twilions”…

Stock options – keeping it in the family

One way companies try to make you more part of a whole is by giving you stock options, especially as bonuses. With my background, I never understood much about stocks and probably left a lot of money on the table in the past. Stock options can be a massive incentive to the initiated. When things go swell they can also be a good way to make some quick money. But in general, I always saw them to be anticlimactic.

Stocks are a bunch of money I could get if I stayed X amount of years with the company. Hopefully by the time they vest that amount won’t be eaten up by inflation or the stocks having tanked. As it is not always your decision to leave a company they can be carrot that’s been dangled for a long time you won’t ever get to.

I understand it from a company point of view. Stock holders are part owners of the company and on paper are involved in the decision about the future of the company. This sounds like a great way to give employees a feeling of belonging and empowerment. Is a letter from time to time that asks you to vote for higher up people in your company you never heard of empowerment? Or does it feel like you have a small voice only on paper? A voice drowned out by larger stock owners who see your company as an investment instead of a place where you work. Drastic company changes happen because of fluctuations in the stock market or demands of high percentage stock owners. I could be wrong there, but I hardly ever heard the employees and small stock holders being the driving force.

It is however important to take stock option bonuses serious. The reason is that this is one of the main ways a lot of companies measure your impact in the company. So while they seem not as exciting as a promotion or getting a direct money bonus, seeing a decline in them could be a danger sign to your career.

You can’t choose a family, but you can who you work for

Families are great, but they can also be tough to work with. And you tend to be forgiving as it is where you came from and people you will have to deal with all your life. It is a complex construct, full of drama, weird relationship fluctuations and surprises. This should not be a thing that interferes with your professional work. So, no, even if that makes me sound like a party pooper, who you work for isn’t your family. Over time you will make friends and bond with people. You can build a network of contacts you shared successes with and learned from failures. But that’s not a family, and it will always feel forced and odd to me when companies use “Family” as a slogan or a way to show that they are “different”.