I spent the two days of the weekend joyfully writing new code that was simple, powerful, testable, and which by the way worked.
I have spent the two days since then doing nothing but looking at 187-frame stack dumps filled with utterly incomprehensible nonsense and no way to debug it.
The latter code, needless to say, is not mine.
Creating stuff makes me happy.
Having other people's stupidity stuffed down my throat makes me want to scream.
Worst of all, the real problem was hidden because one of those frames "helpfully" rewrote everything, losing the real problem.
> "When it comes to writing code, the number one most important skill is how to keep a tangle of features from collapsing under the weight of its own complexity."
Yeah. But I really love just being in my interior coding zone and making really good stuff. I just had a couple of weeks where I could do just that, without interference, and it was sublime.
This weekend I was working on localization stuff, and on an expressive assertions library. You know how in C you have a nice #define assert() macro that can disappear at compile-time. Well, in interpreted languages, this is not supposed to be possible.
However, they too have a compiler, and if you are willing to become unnaturally chummy with it, you can delete those nodes from the parse tree. :)
But then if stuff goes wrong with prod, you want to be able to magically turn them on again WITHOUT A CODE CHANGE, which requires a release cycle, etc.
Or a joke for docs, where they start every method with an underscore to avoid the must-document-methods static analysis tool. Or they put a blank section in the docs. And they never tell you want the function expects as arguments or returns as a return value. And all the classes are built dynamically and given ugly anonymous names that mean nothing.
I believe in WYSIWYG code.
Stuff that does what it says it does, and which fits into your brain at once, and doesn't require that you juggle over 9 million names of God in your head at the same time.
And this is both the best and the worst code in its own way that I have ever seen.
The main problem is that very clever people keep trying to solve the problem of too much complexity by adding still more framework layers of complexity.
It never occurs to those digging the holes that rule #1 is stop digging.
You cannot solve the problem of too much complexity by adding more of the same. It simply is not possible. You must remove it.
So that you can just set an environment variable and override the always/never/carp nature of the assertions.
You just tell prod support to set a variable and start up the web stack again. You can set it to carp so that failed assertions don't stop the app, just carp at you.
But normally the assertions don't even get compiled in prod.
One central function at work has nothing but 14 interlocking anonymous closures for some elaborate dance that is virtually impossible to understand. Another takes ELEVEN UNCHECKED POSITIONAL ARGUMENTS. Another function has 1,000 lines of code in it. These are all signs of disorganized minds.
Me, I try to avoid functions of even three arguments if I can help it. And functions of no arguments are lovely, because you can't fuck them up.
Unless of course you neglect to make sure you were called with none, so people call you with stuff and then you don't notice and they wonder why it didn't do what they said.
These people are all good programmers, but perhaps not great.
They seem impervious to the problem of complexity. It doesn't bother them. Clever programmers devise clever solutions. Brilliant programmers devise simple solutions. There are too many of the former and too few of the latter.
I don't care if it's a complicated problem.
I expect a solution that demonstrates abstraction in cognitively manageable chunks.
Saying it's a complicated problem is no excuse for a 1,000-line function to solve it. To the contrary, in fact.
Yep. That reminds me of something my brother-in-law told me about programming once. He's a dept. chair in CS at Georgia Tech, and I asked him one day if he preferred simple, bare-bones coding or the crafting of elaborate (I used the word "elegant") constructs that were rich and complicated. He just looked at me and said, "The simple solution is the more elegant solution."
> The previous leap second, which took place in 2012, brought down Reddit, Yelp (YELP), LinkedIn (LNKD, Tech30), FourSquare, Gawker and StumbleUpon, among other sites and apps. Qantas' entire computer system went down, forcing employees to check in passengers by hand.
> Twitter is having problem estimating how long ago tweets were sent. Seeing tweets from a minute ago say they were sent a day ago #leapsecond
Of course everybody had to tweet on the extra second. :)
Me, I'm more excited about the close-ups of Pluto and Charon we'll get pretty soon.
Eight years ago I was thinking of going into teaching, and I developed a science project that would track the New Horizons project. At that time, the Pluto flyby was far in the future.
Now here it is, and those kids are out of college by now.
I think I mentioned this, but people who don't understand why Spaniards eat "lunch" (well, comida) at 2pm are those who don't understand that that is solar noon there.
Spain should be in the same tz as England, but isn't.
And this is why you say buenos días until lunch and buenas tardes afterwards. It doesn't matter what time it is, and two people can say opposite things to each other, thereby indicating which one has already eaten. :)
@FaheemMitha If you speak a language fluently, it implies you speak it with ease, smoothly, without hesitation. You could still be fluent and speak the language with an accent, although the accent shouldn't be so strong that the person at times is incomprehensible. A fluent person could speak the language with accuracy, although a native speaker could speak his language fluently even with a regional accent, yet not have an excellent command of his language, making grammatical mistakes at times.
When I hear "excellent command," I think of a person who speaks the language with expertise, mastery, and accuracy. This person may also speak the language with an accent and could still be considered having an excellent command as long as the person doesn't have an accent that makes the language at times incomprehensible.
@skillpatrol Mmm. Your description still allows much room for variability. But in any case, speaking English fluently in India is very much an elite thing. And "expertise, mastery, and accuracy" sounds more like an Oxbridge don to me than even elite Indian English speakers. For example, I know few Indians personally (I could probably count them on the fingers of one hand) who would pause a second to make note of a grammatical error they have made, or even acknowledge it.
@FaheemMitha Or even, perhaps, to realize that they made an error.
Don't get me wrong: most developers I've worked with have indifferent English "mastery" and poor communication skills in general. But the S/N ratio approaches zero whenever I have to be on a call with a team of Indian devs. Start with the lo-fi medium, add a bunch varying of accents, no faces (so I can't tell who's talking) and even if they were speaking perfect English it would make comprehension and communication difficult. But they're not, and they don't seem to care that they're not.
They don't say when they don't understand something, which means they can agree to something that have no ideas about. Which makes them look unreliable.
In fact, it's almost axiomatic that "OK" seems to mean "I don't understand what you just said." That's the most maddening thing.
@Robusto It's a very noticeable feature of Indian culture. At least for me locally. And mostly in a commercial context. I don't have a good network of Indian friends.
The exception is the local free software community. I'm on the Indian Debian list, and it's a little strange to read Indians there writing actual grammatical and properly formatted English.
@Robusto It's quite common in fact to hear OK in response to a question.
@Robusto I don't see how someone could code well and not speak (and write) well. The two go together.
@FaheemMitha I understand that, and I speak Japanese so I'm aware that hai ("yes') in response to a question doesn't mean yes, but something like "noted" . . .
@DamkerngT. I won't argue that point, because essentially I agree with it. I'm trying to give my Indian colleagues as much benefit of doubt as I can.
But when I see code whose variables are full of typos, like getUserFavoriate instead of getUserFavorite and so on, I no longer trust anything in that code.
At least the Japanese will say muzukashii desu ne, meaning "It's difficult, isn't it." And you know you have a communication or agreement problem and can work on that. But when someone just says "OK" and goes off to do whatever, you don't even know you have a problem until something breaks.
@FaheemMitha That's where most of the Indian devs I've worked with come from. My manager, though, is from the Delhi area, and seems different in a lot of ways.
For one thing, he doesn't go back on what he says.
If he tells you something, you can take it to the bank.
Maybe it's the education system that gives a lot of people the mistake aversion. Saying "I don't understand" is in a way admitting that you made a mistake (by being unable to understand the other), I think.
@DamkerngT. But as Jung said, "Neurosis is always a substitute for legitimate suffering." Meaning if you're unwilling or unable to bear the pain of acknowledging something is wrong, not only can't you fix it but it will come back and bite you in the ass harder later on.
What is striking in India is the pervasiveness of many of these features. I would have expected more variability.
Of course, when I say India, I don't really mean India. I mean my little corner of it. Though I do occasionally communicate with people in other parts or it, and they seem no different.
@Robusto I don't see why Delhi would be substantially different.
If you're an American who can code for the Web, and code well, you can pretty much write your own ticket. I could walk out on this company today and have three job offers by the end of the week.
You see some Sikhs, which I don't really count as Indian. They seem like something else.
@FaheemMitha Cheapness is a myth. It costs just as much in productivity to hire an Indian through a middleman, when all is accounted for. The lure is an abundance of people to do the work.
That's for technical work, of course. Unskilled manufacturing is cheaper, but most of that is farmed out to China.
@FaheemMitha What's your opinion of the competence and work ethic for the people contracted by these offshore companies?
@JohanLarsson: Do you have that link to the cartoon about the javascript framework again?