Programming

While programming today, I came up with some nice vim bindings. If you use vim, and want tags-powered “intellisense-like” stuff, use this. Also thrown in there are hotkeys for :Tlist (indispensible vim plugin) and saving quickly (I save often, so I like to have a single key in either normal or insert mode).


" intellisense - yea well close enough
noremap <F2> mz<C-w>1]
noremap <F3> <C-w>c`za
noremap <F4> <C-w>11_

" for insert mode, goes back to unmatched brace
" so it's good for function prototype lookups
inoremap <F2> <ESC>mz 999[(b<C-w>1]

" tlist hotkeys
noremap <F8> :Tlist<CR>
noremap <F9> :TlistUpdate<CR>

" save hotkey for normal and insert modes
noremap <F10> :w<CR>
inoremap <F10> <ESC>:w<CR>a

Algorithms and vim

I spent about 5 hours today doing algorithm homework/studying. I like that class a little more now, even though some of it is a pain. Divide and conquer and dynamic programming actually are powerful concepts, once you get a feel for them.

Then I came back to my dorm, ate some food, and played with vim for literally 2 hours. I guess that was a waste of time, but I learned so much about this editor. Now I feel I can be twice as productive when I code. Especially with all the stuff I implemented for prototype previewing in my vimrc, and with all the support for ctags vim always had but I never used. Wow, this is one powerful programmer’s editor.

Matt has been telling me that I should use emacs with vi emulation (viper), and then I’ll get access to all that great emacs stuff. Maybe. I have nothing against it, except that emacs seems like an operating system unto itself. Eh, it doesn’t matter I guess, I just need to know one of the two well. They are both portable, and run on all major platforms.

The Human Computer

Computer scientists have a lot to learn and realize.

For one thing, computers aren’t the center of the universe. What may be an ideal for computer scientists may not be an ideal for normal people. And very often, computer scientists affect normal people because everyone uses computers (or at least, everyone will).

All these computers sit around on our desks, we only use a fraction of their power at any time. Right now, I am typing this blog entry, using less than 1% of my CPU’s power. Theoretically, it could be doing things–helpful things, things that will make my life easier. It could be doing smart analyses of what I’m writing and try to predict what I’m going to do next. It could be some sort of extension of my mind, helping me produce better work. Instead, it sits there idle, useless. Glorified typewriter.

There have been many innovations, but the “humanity” of computers has been lost. We shouldn’t be designing our lives around them… they should be designed around US. The way the human mind works needs to be complimented. I should not change my ways for the computer, except if in changing them it makes my life easier, less complicated, and makes me more powerful as a human being.

These should be enabling devices. They surely have the potential to be enabling devices. But right now, in many ways, they disable us. We are restricted by the rules programmers place on us. We live under a sort of “law of code” which Lawrence Lessig describes in his books. In addition, the gov’t and other groups seek ways to use computers to control people.

Computers need to become more like us, so that they can seem familiar, useful, but at the same time, a whole lot more powerful. What computers have that we don’t have is speed, time (CPU time), and infinite storage. What we have that computers don’t have is the ability to reason about our experiences in very flexible ways. Wrapping a computer’s speed and storage capabilities around our own flexible abilities as conscious beings would mean a very powerful harmony.

Why are we still talking about how to isolate faults, or make device driver subsystems better, when this human element is so sorely needed, and would be so well appreciated?

Corporations, Morality, and the Bottom Line

Here’s a discussion I got into on /. today. This is the post I responded to.

quote:

they are legally required to put profits for their shareholders above all other considerations

No. You’re wrong. Why do so many people think this? They are responsible to their shareholders in that they cannot willfully or illegally lose their shareholders money. They do no have to forsake their values.


No, you’re naive. The basic naivete comes from your language, in fact. “They do not have to forsake their values.” Sure, they don’t. But there’s a _lot_ of pressure to do so.

Do you really believe people think this because they are whacky? Take a look at this passage from an article from the Harvard Business School:

Generating corporate virtue

By now, the story of Malden Mills and its owner, Aaron Feuerstein, is so familiar that the company name has become a sort of shorthand for corporate benevolence. The tale briefly told: In 1995, a fire destroyed Malden Mills’ textile plant in Lawrence, an economically depressed town in northeastern Massachusetts. With an insurance settlement of close to $300 million in hand, Feuerstein could have, for example, moved operations to a country with a lower wage base, or he could have retired. Instead, he rebuilt in Lawrence and continued to pay his employees while the new plant was under construction.

“Why don’t more companies act that way?” is a common reaction when people first hear the story. It is much too simplistic to reply that Feuerstein is a better person than most. Whatever Feuerstein’s relative level of virtue, he had far fewer shareholders to answer to than the average CEO. Feuerstein’s only shareholders are himself and several members of his family, who presumably share his willingness to sacrifice profits for the sake of the employees’ wellbeing. (Feuerstein was perhaps too willing´┐ŻMalden Mills filed for bankruptcy protection last November.) The typical CEO of a publicly held corporation, by contrast, is accountable to thousands of shareholders.

My purpose here is not to denigrate the share-owned corporation, which is a fundamental building block of democratic capitalism, but to acknowledge that its legal structure imposes certain priorities on its senior leaders. If they fail to maximize earnings for shareholders, managers risk removal by the equity holders to whom they report. Worse, failure to serve shareholders’ interests puts the corporation in jeopardy of being acquired by a stronger company or losing access to capital markets. In theory at least, self-interest and self-preservation ensure that no rational executive will engage in activities that clearly erode shareholder value.

To which he responded:

quote:

At no point did you refute that it is legal to do so, you just said that there are pressures.

Of course there are pressures to gain shareholder value! That’s blatantly obvious.

The act of going public means that you give up control over your company. At any moment when the shareholders think someone else can do a better job of making them money, they kick you out, along with your executive-size salary.

The bottom line is this: you can only be charitable and giving with your OWN MONEY. You can’t donate all the shareholder’s money to your pet cause without expecting them to get a new board.

So, if you want to be a charitable business, simply keep the business private, and don’t make an IPO. Make sure any investors are in agreement with your values. I am my business, and I occasionally give my money to the PostgreSQL project (and other projects to a lesser extent).


And I responded:

I know this thread is dead already, but I just had to respond to this absurdity.

The bottom line is this: you can only be charitable and giving with your OWN MONEY. You can’t donate all the shareholder’s money to your pet cause without expecting them to get a new board.

We are talking about a corporation being morally and socially responsible. That does not mean the corporation has to “donate shareholder money,” although from the sound of it, you hold the typical (and stupid) business mentality that you can just “throw money at things” to solve problems. What I and most people who worry about this stuff are talking about are the actions the corporation takes. Will the corporation’s manufacturing practice adversely affect the environment of the surrounding community? Will closing down a factory in a small town where the company was born, only in order to move to cheaper overseas markets and save some cash, ruin the economy of that town? Is the corporation treating its employees with dignity and respect?

I’m not saying CEO Joe Schmo has to donate his shareholder’s money to Make-a-Wish. I’m saying when he makes decisions, he has to think about things OTHER than the bottom line. And that, increasingly, isn’t the case. CEOs feel pressure from their shareholders due to the legal structure of corporations, which allows a group of shareholders to remove a CEO at the slightest performance dip (when earnings go flat). And a CEO has to worry so much about keeping his own job that he doesn’t let moral and social concerns enter into his corporate decision-making.

Yes, you’re really, really naive.

Havoc Pennington’s essay on UI design

I just found this essay on UI design and am surprised I never read it before. Some of the stuff Havoc says rings particularly true, and also confirms the need for some of the ideas I have for Glade-3 (ideas which, I think, will push UI design into the user’s hands, and exploit the end-to-end principal in the world of graphical software development; this is only one of the key points–my ideas also have other implications that, I think, are good for Linux applications in general).

In my spare time, lately, I’ve been drafting out these ideas, and I think soon I’ll have them clear enough to send a “brainstorm announcement” to the glade-devel mailing list. God I wish I had more time for this stuff!

Computational consciousness

I’m working on this philosophy paper, and am having a bit of a brain struggle. The paper I read makes a very strong point for a model of consciousness that is computational (functional), so that, for example, it is conceivable that a sufficiently advanced computer (or group of computers) could replace the brain and serve the same role (i.e. I’d still have conscious experiences, etc.)… but this is very hard for me to accept at a “gut-reaction” level. Although it would be very easy for me to write a paper defending Dennett’s claim, I am going to have work through this to figure out what is wrong with it (I am convinced something is wrong with it).

A quote Dennett cited (attributed to Fodor) made me laugh out loud and receive stares in this quiet lounge: “If, in short, there is a community of computers living in my head, there had also better be somebody who is in charge; and, by God, it had better be me.”

I have to re-read, and re-read, and outline, and re-read, and maybe, eventually, write.

Laptop returns, cpufreq actually works

My Dad’s really awesome sometimes. In a previous post, I talked about how my laptop’s screen cracked due to a friend’s drunken behavior. Well, my Dad did me a favor and swapped the old HD out of my broken laptop and put it into the new one I got. So now I’m running Linux as if nothing broke.

Here’s another crazy thing… I thought my laptop didn’t have cpu frequency scaling support, but I was actually wrong. It’s just that I didn’t have all the kernel modules I needed loaded. It turns out I can scale the CPU on this laptop from 400mhz up to its max of 1.7Ghz! This is awesome because power consumption goes way down, laptop stays cooler, etc.

Plus, someone wrote an excellent piece of software to do this scaling automatically depending on load and remaining battery power. Temperature readings still come in as 0 degrees celsius, but I decided temp readouts are unnecessary anyway. The BIOS does a good job managing the fan. Yay new laptop! Back to work on my paper.

The Divine Right of Capital

Finally got to read the introduction to this book that I’ve had on my shelf for months. (Check it out Amazon.com.) Makes a very strong case for shareholder-controlled corporations, as they are structured now, being much more aristocratic than democratic. Combine this with Chomsky’s view (whose gist is, though we may have a democratic government, we have a purely fascist structure in our businesses, with top-down control, employees are just “human resources,” etc.), and you start to see why letting corporations run the show isn’t such a great idea.

By the way, if you haven’t, please, please, please see: The Corporation.

Socialism is not the abolition of property

If you look up the definition of socialism, like I recently did, it seems to be the same definition given for communism. Socialism is sometimes called the “intermediary stage to communism,” representing the stage in which workers take control of the means of production.

I was talking to my Dad, and explained to him that this is what annoyed me about all the active socialist groups (ISO/SEP) across the country. They all want violent overthrow, and the complete destruction of capitalism. They even want the abolition of property, and this sort of utopian future. But I don’t buy that. I don’t want to eliminate capitalism… I would just prefer a “fair capitalism,” where the government (and thus, the people) still has the power to regulate industry. Where corporations aren’t given the final word on all their decisions, where the people’s interest enters into things.

Wikipedia gives a better definition of socialism, with a lot of the history of the term, but I really don’t care about the terms. I just wish there was some movement that I could easily support that is simply calling for corporate accountability and industry regulation that is sensible and benefits the people at large.