76 stories
·
2 followers

Cheap Auto Insurance Is a Thing of the Past. Here Are Five Reasons Why - Bloomberg

1 Comment and 2 Shares
Read the whole story
denismm
3 hours ago
reply
> Today’s cars are packed with high-tech gadgetry meant to entertain, comfort and protect occupants. The array of safety equipment now common on cars includes automatic emergency braking, blind-spot detection and lane departure warnings. To give drivers eyes in the back of their head, automotive engineers have embedded cameras, sonar and radar sensors from bumper to bumper. All that technology has driven up the cost of repairing even a minor fender bender.

So they’ve made it more expensive to repair but have all of those features made accidents less likely? (I couldn’t read the rest of the article.)
Share this story
Delete

A Conspiracy To Kill IE6

1 Comment and 2 Shares
Read the whole story
denismm
50 days ago
reply
Posted May 2019 but still a good story.
Share this story
Delete

Generation X workers have become disillusioned with tech culture—and their jobs

1 Comment and 2 Shares

The generation that helped shape modern-day workplace culture is also less interested than their younger peers in working for a large tech firm, a new survey suggests.

Generation X workers are losing motivation for the work they perform in the tech industry. That’s according to a study conducted by the experience management firm Qualtrics. The firm polled tech workers to see how they felt about their companies’ mission and values and their work that is driven by that.

Read Full Story



Read the whole story
denismm
226 days ago
reply
Surely the fact that they’re nearing retirement age is a factor too but this article doesn’t mention it.
Share this story
Delete

Sort data on the Linux command-line

1 Comment and 2 Shares

Unix was first used to process text files, so Unix and Linux both contain a variety of commands that let you act on text contained in files. And even in 2023, these problems come up all the time. Knowing how to work the Linux command line can make some of these problems easier.

This came up recently when I was part of a meeting where we discussed product names, based on an 8-page list of different names from a web search. An important our discussion required knowing the most common instances of the names. Many of the names were repeated, others were minor variations on the names, such as hyphenation or capitalization.

How could we simplify the list so we could discuss it? One person suggested running the data through a spreadsheet; another proposed using a statistical analysis package. I opened a Linux terminal, copied the list of names into a text file, and ran a few Linux commands to reduce the list of names to a manageable grouping. That meant we could discuss the list immediately.

Here’s how I used the Linux command line to quickly find repeated names in a long list.

Remove hyphens

Let’s say I have a list of names that are similar, except some have hyphens and others do not, plus one line that is different. I’ll save this in a plain text file called hyphens:

$ cat hyphens
Lorem-Ipsum
Lorem Ipsum
Dolor Sit Amet
Lorem Ipsum
Lorem-Ipsum
Lorem Ipsum
Lorem-Ipsum

To make comparisons easier, it doesn’t matter if the hyphen is there or not, so let’s remove it. You can use the Linux tr command to easily translate or convert one character to another. In this case, we want “Lorem-Ipsum” to be the same as “Lorem Ipsum.” The easiest way to do that is to convert the hyphen to a space:

$ tr - ' ' < hyphens
Lorem Ipsum
Lorem Ipsum
Dolor Sit Amet
Lorem Ipsum
Lorem Ipsum
Lorem Ipsum
Lorem Ipsum

Now every instance of “Lorem-Ipsum” will become “Lorem Ipsum.” To count the identical names, we can use the sort command to generate a sorted list, then the uniq command to print unique instances of each. The -c option to uniq prints a count of the repeated instances, which is the count we want:

$ tr - ' ' < hyphens | sort | uniq -c
      1 Dolor Sit Amet
      6 Lorem Ipsum

Remove trailing spaces

When I processed the 8-page list of names, I realized some of the entries had spaces at the ends of the lines. The name “Lorem Ipsum” with a space after it is different from the name “Lorem Ipsum” with no space. If your list might have trailing spaces, you can use a quick sed command to remove them.

Let’s start with a different list of names called spaces where some lines have trailing spaces, saved in a file called spaces. Here, we can use the -E or --show-ends option with cat to display a marker at the end of each line, effectively showing where we have trailing spaces:

$ cat --show-ends spaces
Lorem Ipsum  $
Lorem Ipsum  $
Lorem Ipsum$
Lorem Ipsum  $
Lorem Ipsum$
Lorem Ipsum    $

sed is the standard stream editor, and allows you to perform several kinds of automated manipulations on text files. sed acts on regular expressions, a string of characters that matches text on lines in the file. For example, in a regular expression, ^ means the start of a line and $ means the end of a line. Also, + means one or more of the preceding character and * is zero or more of the preceding character.

To strip all trailing spaces from a file, we should match  *$ which means any amount of spaces at the end of a line, and replace it with nothing, which deletes the extra spaces:

$ sed -e 's/ *$//' spaces | cat -e
Lorem Ipsum$
Lorem Ipsum$
Lorem Ipsum$
Lorem Ipsum$
Lorem Ipsum$
Lorem Ipsum$

Convert to lowercase

Some of the names in my file were the same, except for variations on capitalization. But we weren’t interested in differences of uppercase and lowercase letters; we just wanted the names that were otherwise the same.

You can easily convert text to uppercase or lowercase with the tr command. tr can do more than translate single characters; it can also convert between character groups.

For this example, let’s start with three variations on the same name, stored in a file called capitals. One uses uppercase for both “Lorem” and “Ipsum,” one uses capitalization only on “Lorem,” and the last doesn’t use any capitalization:

$ cat capitals
Lorem Ipsum
Lorem ipsum
lorem ipsum

To convert all uppercase letters to lowercase letters, specify [:upper:] and [:lower:] as character groups in the tr command. This tr command converts the text to all lowercase:

$ tr '[:upper:]' '[:lower:]' < capitals
lorem ipsum
lorem ipsum
lorem ipsum

Replace words

In the 8-page list of names, some phrases used “and” while others used an ampersand. For example, “Lorem and Ipsum” and “Lorem & Ipsum.” But for our discussion, the ampersand was unimportant. This is another instance of replacing words, which is a great use case for sed

Let’s start with a sample list of words which are basically the same except two spell out the word “and” while one uses an ampersand. Assume this plain text file called and:

$ cat and
Lorem and Ipsum
Lorem & Ipsum
Lorem and Ipsum

In this case, we want to match the ampersand as the regular expression. This is a special character when the ampersand is on the right side of the sed replacement; used on the right side, the ampersand means replace with the matching text. If you want to convert “and” to an ampersand, you need to be careful about this special case:

$ sed -e 's/and/&/' and
Lorem and Ipsum
Lorem & Ipsum
Lorem and Ipsum

That sed command means find and replace any instances of “and” with the text that matched it, which means replace “and” with “and.” If you want to replace the text with a literal ampersand, you need to “escape” it with a backslash:

$ sed -e 's/and/\&/' and
Lorem & Ipsum
Lorem & Ipsum
Lorem & Ipsum

This works well, but it can cause problems for words with the letters “—and” next to each other, like the word “ampersand.” The same sed command blindly replaces all instances of “and” with an ampersand:

$ echo ampersand | sed -e 's/and/\&/' 
ampers&

Instead, it’s more reliable to go the other way: convert an ampersand to the word “and.” This is also easier for humans to read:

$ sed -e 's/&/and/' and
Lorem and Ipsum
Lorem and Ipsum
Lorem and Ipsum

Putting it all together

To process a long list of names, ignoring capitalization and hyphens, and assuming “and” and ampersand mean the same, we can combine these commands to generate a simplified list. I’ll demonstrate with a randomized list called names of over two hundred entries that are just variations of two phrases:

$ wc -l names
238 names

In this sample, the lines differ in capitalization, hyphens, trailing spaces, and ampersands. Using the sort and uniq commands isn’t quite enough to reduce the list, because the variations of how each line is written means uniq can’t find truly unique entries:

$ sort names | uniq -c | wc -l
24

By using both tr and sed, I can quickly reduce the list to a more meaningful set:

$ tr - ' ' < names | sed -e 's/ *$//' | tr '[:upper:]' '[:lower:]' | sed -e 's/&/and/' | sort | uniq -c
    199 lorem ipsum
     39 one and two

Processing plain text files like this isn’t a common task today, but it is exactly what Unix was written to do. Using a few tools on the Linux command line, every Linux systems administrator can quickly reduce a list of similar entries to a manageable grouping. Let the command line do the hard work for you.

Read the whole story
denismm
298 days ago
reply
I love “sort | uniq -c | sort -n” so much I named a stuffed-animal puppy that. Then I aliased it to “puppy” so I can just do “cat answers.txt | puppy”.
Share this story
Delete

What Could I Do?

1 Comment and 2 Shares

Daniel Pink suggest a small language change in the way you think about a problem you’re trying to solve. So simple. So powerful.

Read the whole story
denismm
445 days ago
reply
Sometimes that’s great but sometimes choosing among the possibilities is the exact problem so adding more options does the opposite of help. Just a question of knowing which is which I guess.
Share this story
Delete

how do I talk with my incompetent boss about his ridiculously inaccurate organizational chart?

1 Comment and 2 Shares

This post, how do I talk with my incompetent boss about his ridiculously inaccurate organizational chart? , was originally published by Alison Green on Ask a Manager.

A reader writes:

My boss, the executive director of a small nonprofit, is grossly incompetent. I won’t go into detail, but please trust that I have it on good authority (friends, colleagues, peers, veteran HR professionals outside of the organization – two of them!) that I am right and he’s completely out of his depth.

In January, I asked for an organizational chart for our small org of four people – my boss, his assistant, me, and a colleague in a parallel position to mine. I wanted to understand the organization’s reporting structure, promotion lines, and how my work intersects with my colleagues.

The latter colleague I mentioned was fired and not replaced, so we’re down to three people, my boss included. Five months after I asked for an organizational chart, we were presented with one. It has 15 positions on it, and my boss is the only person whose job is on the chart. My position and his assistant’s aren’t on it! When we asked why, we were told that we would meet with him one-on-one the following week to discuss. Well, he’s postponed those meetings for three weeks. I know for certain that this isn’t some weird roundabout way to fire us because of everything I’m solely responsible for. It’s more likely that I’m about to be promoted and he’s terribly botching the roll-out.

The chart has more issues than I have time to identify, but in a nutshell, it’s unequitable and nonsensical. It demonstrates with no uncertainty that my boss isn’t qualified to do his job. We have been debating my position, title, and compensation ever since I was hired and immediately realized that I was expected to do the work of three people until he got around to hiring “help” for me. And while my current position isn’t on this org chart, there are indeed three positions on there that describe what I do. My boss has been saying “help is on the way” for the last 10 months since I was hired, but it’s taken him five of them to create an aspirational org chart that was not accompanied by any kind of plan for implementation, so I frankly don’t believe him.

While I am waiting for the meeting about my role, I am becoming more certain that nothing good is going to come from it, and anytime I try to talk to my boss about my position or the fact that I can’t sustain the work of three people, he berates me. I don’t want to continue having this conversation with him in secret. We have no HR, and he made it clear that transparency with my colleague is not an option when I talked about my position in front of her and he told me not to put ideas in her head. I don’t know any board members, and they get all their information from him anyway. Is there some way I can ask to have this meeting witnessed or mediated by an impartial third party? Where would I find someone like that?

Is there any use in trying to provide feedback about how terrible this organizational chart is? My boss is sexist and doesn’t believe that I am knowledgeable about this, but maybe he would believe an “expert?!”

Sometimes when you are in a highly dysfunctional situation, it’s easy for one specific thing to become the focal point for all your outrage, even if that one specific thing isn’t the most egregious thing you’re facing.

I think that’s happening here.

The org chart … doesn’t really matter.

Don’t get me wrong, your boss’s chart sounds ridiculous. But it doesn’t really matter, given the situation you’ve described.

It might feel like it’s very important because of what it represents — your boss’s apparent inability to understand organizational basics like what positions exist, whose role is what, and even how many people the organization employs. Those things matter very much.

But those deficiencies in your boss will exist no matter what the org chart says.

Is it ludicrous that your boss produced an org chart listing 15 positions in an organization of three people, and where two of those three people aren’t listed at all and where there is apparently no plan to fund and hire for those other 12 positions, and that it took him five months to create it? Yes! It is.

But it’s not anywhere near your biggest problem. Your biggest problem is that you are working for a tiny organization led by a grossly incompetent manager (tiny matters here because it means that his incompetence is going to deeply affect every aspect of how things operate). Your second biggest problem is that you are facing an unrealistically high workload for which you’ve seen you will get no help. There are undoubtedly other huge problems that stem from your boss’s gross incompetence as well.

So it doesn’t make sense to focus your energy on the org chart. Even if he produced a beautifully accurate and detailed org chart tomorrow, it wouldn’t change anything. All your big problems would remain.

The incompetence and overwork is what matters. You don’t need a meeting about your role or the chart, or a witness or mediator for that meeting. That would be like putting a lot of energy into finding a perfectly sized bandage for a small cut on your foot when your entire leg is on fire.

You will only solve this by leaving.

Read the whole story
denismm
658 days ago
reply
“That would be like putting a lot of energy into finding a perfectly sized bandage for a small cut on your foot when your entire leg is on fire.”
iaravps
650 days ago
Alison has a great way with words
Share this story
Delete
Next Page of Stories