|
I am trying to track down a thread-safety problem in one of my programs. Valgrind when run as “valgrind –tool=helgrind ./thread-test” claims that there is a problem with the following program (the Valgrind errors are at the end of the post). The SGI documents state [1]: “The SGI implementation of STL is thread-safe only in the sense that simultaneous accesses to distinct containers are safe, and simultaneous read accesses to to shared containers are safe. If multiple threads access a single container, and at least one thread may potentially write, then the user is responsible for ensuring mutual exclusion between the threads during the container accesses. “.
My interpretation of the SGI document is that different STL strings can be manipulated independently. When I have two threads running I have two stacks, so strings that are allocated on the stack will be “distinct containers“. So this looks like a bug in the STL or a bug in Valgrind. I am hesitant to file a bug report because I remember the advice that a wise programmer once gave me: “the people who develop compilers and tool chains are much better at coding than you, any time you think there’s a bug in their code there is probably a bug in yours“. I know that my blog is read by some really great programmers. I look forward to someone explaining what is wrong with my code or confirming that I have found a bug in Valgrind or the STL.
#define NUM_THREADS 2
#include <stdlib.h>
#include <pthread.h>
#include <stdio.h>
#include <string>
using namespace std;
void whatever()
{
string str;
str.erase();
}
struct thread_data
{
int thread_id;
};
void *do_work(void *data)
{
struct thread_data *td = (struct thread_data *)data;
printf("%d:stack:%X\n", td->thread_id, &td);
while(1)
whatever();
}
int main(int argc, char **argv)
{
pthread_t *thread_info = (pthread_t *)calloc(NUM_THREADS, sizeof(thread_info));
pthread_attr_t attr;
if(pthread_attr_init(&attr) || pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE) || pthread_attr_setstacksize(&attr, 32*1024))
fprintf(stderr, "Can't set thread attributes.\n");
int t;
struct thread_data td[NUM_THREADS];
for(t = 0; t < NUM_THREADS; t++)
{
printf("created thread %d\n", t);
td[t].thread_id = t;
int p = pthread_create(&thread_info[t], &attr, do_work, (void *)&td[t]);
if(p)
{
fprintf(stderr, "Can't create thread %d\n", t);
exit(1);
}
}
pthread_attr_destroy(&attr);
void *value_ptr;
for(t = 0; t < NUM_THREADS; t++)
pthread_join(thread_info[t], &value_ptr);
free(thread_info);
return 0;
}
==30622== Possible data race during write of size 4 at 0x414FED0
==30622== at 0x40FAD9A: std::string::_Rep::_M_set_sharable() (basic_string.h:201)
==30622== by 0x40A945E: _ZNSs4_Rep26_M_set_length_and_sharableEj@@GLIBCXX_3.4.5 (basic_string.h:206)
==30622== by 0x40FD6B6: std::string::_M_mutate(unsigned, unsigned, unsigned) (basic_string.tcc:471)
==30622== by 0x40FDBEE: std::string::erase(unsigned, unsigned) (basic_string.h:1133)
==30622== by 0x8048AA8: whatever() (thread-test.cpp:16)
==30622== by 0x8048B0A: do_work(void*) (thread-test.cpp:29)
==30622== by 0x402641B: mythread_wrapper (hg_intercepts.c:193)
==30622== by 0x40464BF: start_thread (in /lib/i686/cmov/libpthread-2.7.so)
==30622== by 0x42696DD: clone (in /lib/i686/cmov/libc-2.7.so)
==30622== Old state: shared-readonly by threads #2, #3
==30622== New state: shared-modified by threads #2, #3
==30622== Reason: this thread, #3, holds no consistent locks
==30622== Location 0x414FED0 has never been protected by any lock
==30622==
==30622== Possible data race during write of size 4 at 0x414FEC8
==30622== at 0x40A9465: _ZNSs4_Rep26_M_set_length_and_sharableEj@@GLIBCXX_3.4.5 (basic_string.h:207)
==30622== by 0x40FD6B6: std::string::_M_mutate(unsigned, unsigned, unsigned) (basic_string.tcc:471)
==30622== by 0x40FDBEE: std::string::erase(unsigned, unsigned) (basic_string.h:1133)
==30622== by 0x8048AA8: whatever() (thread-test.cpp:16)
==30622== by 0x8048B0A: do_work(void*) (thread-test.cpp:29)
==30622== by 0x402641B: mythread_wrapper (hg_intercepts.c:193)
==30622== by 0x40464BF: start_thread (in /lib/i686/cmov/libpthread-2.7.so)
==30622== by 0x42696DD: clone (in /lib/i686/cmov/libc-2.7.so)
==30622== Old state: shared-readonly by threads #2, #3
==30622== New state: shared-modified by threads #2, #3
==30622== Reason: this thread, #3, holds no consistent locks
==30622== Location 0x414FEC8 has never been protected by any lock
==30622==
==30622== Possible data race during write of size 1 at 0x414FED4
==30622== at 0x40A9012: std::char_traits<char>::assign(char&, char const&) (char_traits.h:246)
==30622== by 0x40A9488: _ZNSs4_Rep26_M_set_length_and_sharableEj@@GLIBCXX_3.4.5 (basic_string.h:208)
==30622== by 0x40FD6B6: std::string::_M_mutate(unsigned, unsigned, unsigned) (basic_string.tcc:471)
==30622== by 0x40FDBEE: std::string::erase(unsigned, unsigned) (basic_string.h:1133)
==30622== by 0x8048AA8: whatever() (thread-test.cpp:16)
==30622== by 0x8048B0A: do_work(void*) (thread-test.cpp:29)
==30622== by 0x402641B: mythread_wrapper (hg_intercepts.c:193)
==30622== by 0x40464BF: start_thread (in /lib/i686/cmov/libpthread-2.7.so)
==30622== by 0x42696DD: clone (in /lib/i686/cmov/libc-2.7.so)
==30622== Old state: owned exclusively by thread #2
==30622== New state: shared-modified by threads #2, #3
==30622== Reason: this thread, #3, holds no locks at all
Separating Fact From Fiction: An Examination of Deceptive Self-Presentation in Online Dating Profiles is a really interesting paper by Catalina L. Toma and Jeffrey Hancock of Cornell University and Nicole Ellison Michigan State University [1]. People who don’t use the Internet much regard online dating as an area that is filled with liars – largely due to a small number of gross liars that are well publicised (EG people conducting net-relationships while lying about their gender), but the evidence suggests that this is not the case.
The first point this paper made which I found to be particularly interesting is that anyone who desires a meeting in person will be limited in their lies (EG they have to post a real photograph of themself). So it seems that someone who doesn’t want to be lied to should insist on phone calls and meetings in person without much delay – the worst horror stories about online dating seem to concern people who interact over the net for many months before meeting. Maybe it would be a good strategy for users of singles sites to have a paragraph stating “I want to talk to you after receiving X messages” where X is some number significantly less than 10.
The next point was that connections to the real-world persona decrease the ability to lie, lying on a dating site that is only read by other singles is going to be easier than lying on your favorite social networking site, personal web-site, blog, or any other online resource that is read by people who know you. So someone who didn’t want to be lied to could demand the link to other online resources of the person that they are corresponding to.
Also the ability to track different versions of the profile decreases the ability to lie. It would be interesting if some of the singles sites added a history tracking feature so that it was possible to see the previous versions of someone’s profile. But even without such a feature the need to have a single profile greatly decreases the ability to lie. When trying to impress someone in a bar I believe that it is standard practice to pretend to be interested in whatever interests them, but on a profile page it is necessary to provide a short list of interests that remains relatively static.
Later in the paper there is an analysis of the average discrepancies of the profiles, which in most cases are small enough that they would not be noticed when meeting in person. But it does note that there were a few extreme lies (such as someone misrepresenting their age by 11 years).
Near the end of the paper there is a brief description of some related research. One interesting point is that even when there is no way for a liar to be caught (EG online discussion forums in which no meeting in person is planned) most people will still tend not to lie much. Great lies require a change in self-concept, and most people don’t want to think of themself as a liar.
It seems to me that this paper provides strong evidence to show that no-one should be afraid of being lied to on an Internet singles site and it can also be used to form strategies to avoid being the victim of a lie. So for those of you who are single and afraid of singles sites, fear no more!
When discussing career advice one idea that occasionally comes up is that someone should be “well rounded” and should demonstrate this by listing skills that are entirely unrelated to the job in question. Something along the lines of “I’m applying for your C programmer position, and I like spending my spare time playing tennis and golf“.
I suspect that the bad idea in question originated in the days when it was not uncommon to work for the same company for 20+ years and when there were company picnics etc. In that social environment employing someone implied socialising with them outside work so it would be a benefit to have something in common with your employees other than working for the same company. Also in those times there were few laws about discrimination in the hiring process.
It is often claimed that participation in team sports teaches people how to do well in team activities in a work environment. I have previously described the ways in which software development is a team sport [1]. Like most analogies this one is good in some ways and bad in others. Team-work is required in software development but it’s not quite the same as the team-work in sports. One significant difference is that most team sports have a single ball, and the person who has the ball (or who is about to catch it, hit it, etc) is (for a moment) the most important person on the field. There have been many sporting debacles when two players from the same team tried to catch a ball at the same time, so the rule in team sports is that you don’t compete with a colleague. In a work environment there are many situations where it’s necessary for tasks to be passed between colleagues at short notice. For example when a deadline is imminent tasks often need to be reassigned to the most skilled people. A junior programmer needs to know that they aren’t an athlete who is running with the ball, their teamwork involves having difficult tasks being reassigned from them at short notice.
Another significant difference between sports and work is the amount of aggression that is tolerated. In most sports some level of harassment of opposing players is tolerated. But in the modern workplace using a single naughty word can be considered as just cause for instantly sacking an employee. So it seems that exposure to an aggressive sporting environment would be a bad thing if it actually makes any difference.
One thing that is sometimes ignored is the teamwork that is involved with hobbyist computer work. Being involved with a software development team for fun will surely give teamwork experience that is more relevant to paid software development work than any sport!
One of the reasons cited for being “well rounded” is the ability to have a “work life balance“. I might almost believe such a claim if it wasn’t made in connection with the IT industry. But given how common it is to demand 60 hour working weeks (or longer) and the number of people who are required to have mobile phones turned on when they aren’t at work it seems that the general trend in the IT industry is against a work-life balance. When hiring people to work in cultures where a strict 40 hour working week is well accepted it seems that hiring people who are willing to work as long as required is important. When I worked in the Netherlands I lost count of the number of times I worked until 10PM or later to fix a broken system after all my Dutch colleagues departed at 5PM.
I have also seen the bizarre claim that consumption of alcohol leads to developing better social skills. It seems really strange to me that anyone would want to work in a company where social skills that are relevant to a bar would be useful (I am reminded of a company that was named after the founder’s penis – I declined to send my CV to that company). Also of course there is the fact that in most countries where I would want to live it is illegal to discriminate against hiring someone for refusing to drink alcohol.
It is quite common for the geekiest people to do a significant portion of their socialising via email and instant/short-messaging (formerly IRC, now Jabber, Twitter, and other services). It seems to me that this experience is more relevant to most aspects of the modern work environment (where most communication that matters is via email and instant-messaging) than any form of socialising that happens in a sports club or a bar. In fact people who are used to face-to-face dealings might have difficulty fitting in to an environment where most communication is electronic.
Now employers seem to have worked these things out. Recruiting agents (who reject most job applicants) have told me that they want to see nothing on a CV that doesn’t relate to a job. That is an extreme position, but seems to represent the desires of the hiring managers who will see the CVs that get past the recruiters. Hiring managers often don’t even read a CV before an interview, they often entirely rely on recruiting agents to determine who they will interview. So it seems that an effective CV will in most cases list as many keywords as possible, demonstrate experience in the technologies that were listed in the job advert, show years of work with no long breaks, and have little else.
Finally the IT industry is distinguished by having a significant number of people who’s work and hobby are almost identical, those people tend to be significantly more skilled than average. It seems to be a bad idea to avoid the potential of hiring some of the most skilled people.
To a large extent your career success depends on what you learn from your colleagues, so if you end up working in a team of people with low skills then it is bad for your career. Therefore it seems that anyone who wants to have a successful career will strive to avoid working for a company who’s hiring process had any criteria other than the ability to do the job well and the ability to not be a jerk. So when it comes to the technical part of a job interview (where the hiring manager brings his most technical people to grill the candidate) it probably makes sense to ask those technical people what their hobbies are. If their hobby is something other than computers then it indicates that the employer might be a bad one – so at least you should ask for more money as compensation for not having highly skilled colleagues.
KickStarter.com is an interesting new service that allows creative people to solicit funding to start new enterprises [1]. Note that it is not for investing in projects, sponsors give the money and the result is that the work gets done. Unfortunately it only allows people with US bank accounts to receive money at this time.
Corey Doctorow and Charles Stross gave an interesting public discussion about privacy on the net titled “Open Rights – the All Seeing Eye” [2].
Ray Kurzweil announced the Singularity University at TED [3]. It will be run from a NASA research facility and teach all the core areas of technology related to the Singularity.
Stewart Brand gave a short but interesting TED talk about squatter cities [4]. He predicts that the population movement from rural areas to squatter cities will defuse the population problems as the rate of reproduction in cities is much closer to the rate needed to sustain the population (2.1 children per family) than that in the country. He didn’t mention the fact that disease spreads rapidly in squatter cities which culls the population. A related TED talk by Paul Collier describes how a Marshall Plan could be used to help the poorest billion people in the world [5]. He focuses on good governance as a required part of such a plan because that is the least immediately obvious requirement.
Here is a link for a famous TV clip of a man dancing in Sydney to celebrate the end of WW2 [6].
Zeke M. Vanderhoek is starting a school in the US where each teacher will get a salary of $US125,000 plus bonuses [7]. The school will primarily accept local students from the Washington Heights area, primarily students who do not perform well academically and who are from low income households. The class size will be 30 and the aim is to show that great teachers are the key to good education not small classes. The article notes that some teachers seem great on paper but perform badly in the class – like most jobs it’s easy to say that you are good. I hope this experiment works.
As a counter-point to Zeke’s work Caulfield Grammar School has introduced a “Learning Mentor” program for years 7 and 8 [8] which involves having a second teacher in the class. It’s an interesting concept, but I think that it’s unlikely to do much good given the other things that they are doing. Caulfield is also implementing some awful ideas such as having lots of specialised sports coaches and spreading the VCE over three years instead of two. The two-year VCE is itself quite awful, if it had been introduced one year earlier I would have had to do year 12 in another state to avoid it.
The Atlantic has an interesting article about the Harvard Study of Adult Development and it’s long-time director George Vaillant [9]. The conclusion seems to be that the secret to happyness is to employ mature adaptations to adverse situations, be well educated, have a stable marriage, don’t smoking, abuse alcohol (and presumably don’t abuse any other drugs), get some exercise, and have a healthy weight.
Adam Harvey has a good post summarising the current Microsoft actions in advertising it’s new web browser [10]. I doubt that this will go well for MS.
Diane Benscoter gave an interesting TED interview and a slightly less interesting TED lecture about her experiences with the Moonies [1]. She describes how she was a victim of the cult for five years, and then after being deprogrammed she spent five years working as a deprogrammer [2].
In her interview she described the first identifying trait of a cult as an “all or nothing world view” with “easy answers to complex questions are handed to you on a silver platter and if you’re asked to believe in them unquestioningly and told not to seek an alternative“. However that seems to describe most religions.
It seems to me that when someone describes an organisation as a cult they are usually not referring to how old the organisation is (the term “new religious movement” is sometimes used as a synonym for “cult“) or whether it uses circular logic and specifies that belief in God is the answer to some significant questions. What they usually mean is that the organisation has harmed it’s members or society in some way.
Based on discussing various religions with many people, here are some criteria that I believe are generally regarded as differentiating religions and cults:
- Religious leaders regard their followers as being individuals who need protection and assistance, while cult leaders tend to regard people as a resource to be exploited. It seems to be the standard practice that cult victims will end up with no money. But people who become religious are often encouraged to adopt practices that can increase their income (EG by avoiding alcohol and drug use). Most people who regularly attend church and who are in a good financial position are expected to donate 10% of their income – which still allows them to have a good standard of living.
- Religions tend to encourage people to be healthy, there are many anecdotes of people recovering from health problems such as addiction to alcohol or other chemicals after becoming religious. Banning the consumption of alcohol (as most variants of Islam do) seems to be a reasonable measure for protecting the health of believers, banning the consumption of pork in times and places where the current first-world health technologies are unavailable also seems to be a good idea.
Cults often encourage people to be unhealthy. It’s common for cults to ban medical treatment or to compel their victims to take drugs. Some cults compel their victims to consume alcohol when there are medical reasons to avoid it (EG diabetes). Cults also often advocate activity that involves an unreasonable risk of sexually transmitted diseases.
- Religions tend to focus on making the world a better place. Generally some of the money that is donated to religions is used for helping disadvantaged people. Religious leaders encourage their followers to act in a way that improves the world for everyone by objective criteria. Cult leaders tend to only want to personally benefit. If a leader has twenty Rolls-Royces then their organisation is more like a cult than a religion.
- Cults break up families. When an organisation prohibits someone from associating with close relatives (such as parents) because they don’t agree with it then it’s a cult.
- Religions respect personal beliefs and freedom of choice. Blindly following a leader is not required.
While it’s not commonly recognised, it seems to me that any organisation that tries to impose it’s own moral ideas by force of law is tending towards being a cult.
- Religions don’t needlessly prevent people from being happy. A forced vow of celibacy is a cult feature.
- Religions try to avoid encouraging their followers to break the law. In some cases nothing less than prohibiting a religion will make a religious leader advocate criminal activity.
Now if you examine the history of any religious group that has been operating for a few hundred years you will probably see cases where it matches the cult criteria. It seems to me that some of the ideas about cults were created by groups that want to protect their own status as “religions” and hobble the competition. The idea that new religions are cults is one example. Another is the idea that there is a boolean criteria of cult vs religion which allows groups recognised as religions to squash the competition without having to improve their own performance and become less cult-like.
The Cult page on Wikipedia is not very helpful when considering these issues and the leading definitions are the ones most opposed to the common use [3].
One problem that I have had on a number of occasions when developing Unix software is libraries that use non-reentrant code which are called from threaded programs. For example if a function such as strtok() is used which is implemented with a static variable to allow subsequent calls to operate on the same string then calling it from a threaded program may result in a SEGV (if for example thread A calls strtok() and then frees the memory before thread B makes a second call to strtok(). Another problem is that a multithreaded program may have multiple threads performing operations on data of different sensitivity levels, for example a threaded milter may operate on email destined for different users at the same time. In that case use of a library call which is not thread safe may result in data being sent to the wrong destination.
One potential solution is to use a non-threaded programming model (IE a state machine or using multiple processes). State machines don’t work with libraries based on a callback model (EG libmilter), can’t take advantage of the CPU power available in a system with multiple CPU cores, and require asynchronous implementations of DNS name resolution. Multiple processes will often give less performance and are badly received by users who don’t want to see hundreds of processes in ps output.
So the question is how to discover whether a library that is used by your program has code that is not reentrant. Obviously a library could implement it’s own functions that use static variables – I don’t have a solution to this. But a more common problem is a library that uses strtok() and other libc functions that aren’t reentrant – simply because they are more convenient. Trying to examine the program with nm and similar tools doesn’t seem viable as libraries tend to depend on other libraries so it’s not uncommon to have 20 shared objects being linked in at run-time. Also there is the potential problem of code that isn’t called, if library function foo() happens to call strtok() but I only call function bar() from that library then even though it resolves the symbol strtok at run-time it shouldn’t be a problem for me.
So the obvious step is to use a LD_PRELOAD hack to override all the undesirable functions with code that will assert() or otherwise notify the developer. Bruce Chapman of Sun did a good job of this in 2002 for Solaris [1]. His code is very feature complete but has a limited list of unsafe functions.
Instead of using his code I wrote a minimal implementation of the same concept which searches the section 3 man pages installed on the system for functions which have a _r variant. In addition to that list of functions I added some functions from Bruce’s list which did not have a _r variant. That way I got a list of 72 functions compared to the 40 that Bruce uses. Of course with my method the number of functions that are intercepted will depend on the configuration of the system used to build the code – but that is OK, if the man pages are complete then that will cover all functions that can be called from programs that you write.
Now there is one significant disadvantage to my code. That is the case where unsafe functions are called before child threads are created. Such code will be aborted even though in production it won’t cause any problems. One thing I am idly considering is writing code to parse the man pages for the various functions so it can use the correct parameters for proxying the library calls with dlsym(RTLD_NEXT, function_name). The other option would be to hand code each of the 72 functions (and use more hand coding for each new library function I wanted to add).
To run my code you simply compile the shared object and then run “LD_PRELOAD=./thread.so ./program_to_test” and the program will abort and generate a core dump if the undesirable functions are called.
Here’s the source to the main program:
#!/bin/bash
cat > thread.c << END
#undef NDEBUG
#include <assert.h>
END
OTHERS="getservbyname getservbyport getprotobyname getnetbyname getnetbyaddr getrpcbyname getrpcbynumber getrpcent ctermid tempnam gcvt getservent"
for n in $OTHERS $(ls -1 /usr/share/man/man3/*_r.*|sed -e "s/^.*\///" -e "s/_r\..*$//"|grep -v ^lgamma|sort -u) ; do
cat >> thread.c << END
void $n()
{
assert(0);
}
END
done
Here is the Makefile, probably the tabs will be munged by my blog but I’m sure you know where they go:
all: thread.so
thread.c: gen.sh Makefile
./gen.sh
thread.so: thread.c
gcc -shared -o thread.so -fPIC thread.c
clean:
rm thread.so thread.c
Update:
Simon Josefsson wrote an interesting article in response to this [2].
I am writing this post at a small cafe while my car is being serviced. I tried a local Red Rooster food store, a KFC, and a McDonalds but none of them had a power socket I could use. This seems quite perverse as McDonalds advertises free wifi net access to entice customers, but no power to charge laptops, phones, etc. So anyone who has 3G net access will avoid that particular McDonalds store in spite of the free Wifi.
Also this is not something that happens accidentally. Power sockets are needed to power the variety of cleaning equipment that is used at fast food stores and it would same some cleaning time if they were centrally located, so someone at those fast food stores apparently decided to put power sockets out of reach of customers. I’m currently seated in a position that is within vacuum cleaner range of every table in the cafe, so whoever rents the premises to the small restaurants has thought of these things.
At home tariffs a laptop will consume about 1/3 of a cent worth of electricity per hour. It seems to me that a smart business owner would want to have several power sockets available to customers and advertise this fact. One cafe has made considerably more than 1/3 of a cent profit from me due to having a power socket where I could use it.
Note that not all McDonalds stores have this problem. One I visited last week had a power socket where I could use it. I noticed that they had made a good choice of uncomfortable chairs to discourage customers from spending too long there, it took the rest of the day to recover from a couple of hours sitting in McDonalds.
Mark Glossop has written about the best designs for offices to increase productivity and attract qualified staff [1]. He makes a lot of really good points and cites the Joel on Software blog post about “Bionic Offices” [2], it’s sequel “Updated Offices” [3], and Joel’s “Field Guide to Developers” [4]. Interestingly Joel disclaims a connection to “stereotypical Asperger’s geeks” while his points about private offices to avoid distractions, technical issues trumping politics, letting developers choose their own projects and tools, and making the company seem to be doing things that are good for society would apply well to people with Asperger Syndrome [5].
While Mark has made some great points, he has totally missed one important issue – that of being able to do some useful work. The section about “no dysfunctional politics” in Joel’s Field Guide does to some extent cover that issue if broadly interpreted. But generally anyone who is good at a job will want to be allowed to do it and anything which prevents them will make “work” less pleasant. I wonder if Mark has been fortunate enough to miss out on the experience of working for a company that has problems which are suitable for submission to The Daily WTF (Curious Perversions in IT) [6].
The Worst Company I have Worked for
The worst environment that I have ever worked in was for a financial organisation. They were proud of providing a good working environment, all Occupational Health and Safety issues were properly addressed, the office was always clean, etc – many of the people who worked there considered themselves to be fortunate to work there. But almost no work was done due to foolish paperwork! The worst example was a bug in an Apache module that caused an Intranet server to hang every couple of days, the symptom was trivially fixed by restarting Apache or it could have been worked around by a cron job that restarted Apache every night at midnight (the web application was only used in business hours). But instead every few days there were a few hours of down-time while managers worked together to get appropriate approval for me to restart Apache.
On one of the first occasions that Apache hung I asked my manager if I should restart Apache and get the paperwork done afterwards (which is standard system administration practice in every office where you would want to work). I was told that anyone who did such a thing would be sacked and slandered to try and prevent them from gaining other employment. It’s generally regarded that a wise manager won’t say anything bad about a former employee when asked for a reference due to legal reasons, it’s the absence of good things being said that indicates a problem. Deliberate slander would be good grounds for a law suit, but it seems that the management of some companies think that they are above the law.
When I resigned I told my managers that I was depressed and couldn’t stand being there.
In future I will try and identify such companies and walk away from job interviews. I will ask about the paperwork requirements and also ask to inspect the workstations that are used. Any company that pays top rates to people while forcing them to use workstations that would be in the rubbish at any normal company is obviously extremely dysfunctional and should be avoided.
The Best Company I have Worked for
I have worked in a few environments that were really good by various objective measures. One that stands out as being a little better than the rest is a small company that provides network support services. A large part of their business involved maintaining network gear for medium sized organisations. Small companies tend to have financial problems and this one was no exception, there were minor issues such as holes in the carpet that would have been regarded as OH&S violations at any corporation – but everyone knew that it was best to just walk carefully and not complain so that there was money for more important things (such as payroll). Of course many other aspects of a good working environment (such as good office furniture and good monitors) were also lacking due to financial issues. So by the Joel’s standards they were doing quite badly – but this didn’t make them a bad employer.
One significant positive aspect of this company was that everyone there was really friendly, I don’t know how much of this was due to hiring nice people and how much of it was due to having a positive social environment that encouraged the best behavior from everyone. Another major benefit was that things got done with little resistance, small companies that last tend not to have much in the way of political problems. Joel states a principle of not hiring jerks, but an average person can act like a jerks on a bad day. To have a team of people consistently not act like a jerks is unusual.
Another big advantage of that company was it’s positive and supportive attitude towards staff. When I started working for them my car was having some major repairs, so the owner of the company lent me a car for a couple of weeks. Staff who wanted to apply for work at bigger companies due to the limits for career growth in a small company were encouraged to do so. This is a great contrast to the attitude of managers in most companies who want to do whatever it takes to retain staff and who are reluctant to accept that employees will sometimes have good reasons for working elsewhere. This was good for employees and also good for the company who ended up with a ratio of payroll expenses to skilled employees that was far better than the industry average.
Update: ComputerWorld has an article about managing geeks [7]. The summary is that senior managers should listen to the technical professionals, have some basic technical knowledge, and that IT staff should be involved in recruiting new managers.
Jonathan Drori gave an interesting TED talk about the Millenium Seed Bank [1]. The potential for discovering new uses of plants for food, medicine, and construction is obvious, so it also seems obvious to me that we should preserve as many varieties of plant as possible to allow for future uses. As well as those obvious uses there are other potential uses of plants to cope with the changing climate and new diseases. Seeds from salt-tolerant plants have already been sent to Australia to help deal with the salinity problems related to the ongoing process of desertification and excessive use of bore water.
The seeds are stored in bunkers that are designed to withstand nuclear attack, I doubt that such protection will be necessary – or that it would be successful it it was needed.
Jonathan also gave a TED interview with more detail on this topic [2]. One particularly interesting issue is the work on testing seeds for viability and for developing germination protocols to specify the best combination of changes in temperature, moisture, etc to germinate seeds. This research seems to have a lot of potential to improve crop yields.
He mentioned in passing a project to collect folk-tales related to plants which apparently has led to some scientific discoveries.
A related project is the Norwegian Svalbard seed vault which seems mostly aimed at crop seeds [3]. The main difference is that Svalbard provides black-box storage (like a bank safe-deposit vault) while the Millennium Seed Bank owns the seeds. Incidentally the Bill and Melinda Gates Foundation provides significant support to Svalbard (so Bill does do some good things).
One thing that seems strange to me is the fact that governments are prepared to spend such large amounts of money on anti-terrorism but spend so little on seed banks and other projects that can help protect the food supply. If a country such as Australia (which exports a lot of food) was suddenly unable to produce enough food to even support the local population then the consequences would be much worse than anything Osama could dream up.
A reasonably common feature in Internet debates is that of one party claiming to not care about the issue. Statements such as “I haven’t got time to debate this” or “I’m not interested” are used to try and disclaim any interest in the topic. Such claims are silly and rather amusing.
Outside the Internet it does make sense to say “I don’t care” because interactions are between small numbers of people. Telling a tele-marketer that you don’t care about their product is part of the process of getting them to stop calling you. But it doesn’t make sense in interactions between large numbers of people.
If there are 100 people on a mailing list then there will be a variety of opinions about any issue, but one thing you can count on is that the majority of people on the list are not interested in whether any individual cares about an issue. If there was a general desire to discover how many people cared about a topic of discussion then the way to determine this would be via an online poll. In almost every situation individuals saying “I don’t care” in email just isn’t a scalable solution. The only exception is when someone in a leadership position is asked for an opinion, in such a case a response is expected and if the leader actually doesn’t care then saying so and letting other methods be used to resolve the dispute makes sense.
One common case where an “I don’t care” message is seen is at the end of a long and heated discussion. After a discussion has gone on for a while (well beyond the point where it was obvious that no-one was going to change their position) one party might claim to not care or not have the time to debate the issue. But of course if they didn’t care at all or had no time then they wouldn’t have written any messages on the topic. If they had a limit to their time or care factor then they would probably have stated their opinion once and maybe written a single follow-up post clarifying the first one. Anyone who has written 6+ messages or a total of 1000+ words on a topic obviously cares and obviously has time. In such cases it seems that claiming to not care or not have time is a final desperate attempt at getting the last post on a topic by someone who subscribes to the “last post wins” school of online debating.
Another common case is when someone makes a point that is decisively refuted. The Internet is filled with people who can’t handle criticism and who can never leave any critical email without a reply. In such a situation claiming to not care is a way that such a person can protect their fragile ego even if the point is indefensible. One of the variations on this theme is to claim to be an expert who doesn’t care enough to educate people on mailing lists (or even provide a couple of URLs that reference what they need to know). As a hint, if you are going to claim to be an expert while making statements that disagree with notable experts in the field in question (professors at prestigious universities, Nobel laureates, or people who have demonstrated great practical success) then you really need to demonstrate your expertise and cite references.
While generally it’s the scope of the Internet that makes the “I don’t care” argument silly, it also doesn’t make sense in interactions via electronic media such as private email where a sender can be ignored. If you don’t care about a private email in reply to one of your messages then what you will do is simply delete it. Replying and saying “I don’t care” merely demonstrates that you do care, invites another reply, and shows that you have a fragile ego to protect. My general practice when dealing with such people is to send one reply to every message that they send me, such people typically demonstrate how much they care by sending me more than a dozen messages explaining in detail how much they don’t care.
Another variation on the theme of private correspondence is people who write blog comments that are obviously inappropriate and will not pass moderation. Someone who polls my blog to see if their comment has been approved and then writes an abusive comment when they discover that they fell well short of my comment quality standards obviously cares about having their comment published. To then claim to not care about whether their comment was approved is obviously a lie.
Google is almost entirely filled with things that I don’t care about. I demonstrate the fact that I don’t care about them by not commenting.
|
|