Jul. 22nd, 2003

elfs: (Default)
Yesterday, while at work, I had a mission. It was a simple one: hook up a query to a database, show the results of the query-- a list of names-- to the user, and let the user pick one.

It took me about 45 minutes to hack a basic system. I even did it using a new chunk of technology (the Python iterator system, new in 2.2) that saved me a whole lot of memory (which was useful, since I could now burn that memory for caching results of associate queries, which made follow-on main queries faster... it's all very geeky). Since it's a web application, the back end was python, the front end HTML and Javascript, with a few style sheets tossed in for good measure.

I also did it using a heavily functional style (there are four basic programming paradigms: procedural, objective, functional, and the one Forth uses that nobody really understands...). Python lets you write in all of the above styles (except the Forth one). One of the programmers who took over my job while I was gone on vacation looked at the code and said, "I would never have gotten there that way."

I asked if there was something wrong with my code. He said there wasn't, and that was his point: there wasn't a wasted line or an unneeded side effect anywhere in the code. I'd gone from raw data to correct output in a very readable way without doing anything extraneous that could introduce errors.

And then I had this realization: This is what they pay me for. The years of programming experience and the depth of knowledge about HTML, CSS, Javascript, Python, C, C++, and so on are important, but it's the ability to apply those quickly with precision and concision that keeps me employed. It's the ability to understand that the task really is about data-in, data-out, while filtering the garbage, and to know exactly what tool will do the best about filtering the garbage and arranging the rest for the human eye.

It was kind of neat, after a long bout of self-doubt, to realize what it is about my progamming abilities, particularly, that makes me economically valuable to other people.
elfs: (Default)
In the latest linux kernel (2.4.21), there's an add-on component called kswsuspd, which stands for Kernel Swap Software Suspend. The idea is taken from laptops, where you can make them "hibernate" and use less (or no) power while transporting them from place to place. It takes the image already active in memory and writes it out to the computer's swap space on disk, and when you restart recognizes the image and loads it, bringing your session instantly back to life.

I decided to try it on Lain, the laptop. This is rather silly because Lain already has two perfectly functional hibernation modes already: the slow one called "hibernate", which takes about three minutes to perform going either way but uses no battery power at all when down, and the fast one called "suspend", which works when I shut the lid, takes about 15 seconds to go down and three to come back up, but will use the battery minimally and will die after four or five days. I always use suspend because, well, there's no reason to hibernate when I'm just taking a bus ride or going to work.

I built a kernel with kswsuspd and tried it. It was faster than hibernate but slower than suspend, taking only a minute going either way. I watched it go into hibernate, which means it uses no power, and then I restarted it. The kernel root loaded, saw the "hibernate" block in the swap space, and went for it. Kswsuspd all seemed to be working nicely. Even X came up, the clock was working, the network was available, even the music was still playing.

Then I realized to my horror that neither the keyboard nor the mouse worked. The machine was completely insensate to my probing. Even kernel-based keyboard activities, stuff that happens before the keymaps, didn't get a response. It "worked," but I couldn't do anything with it.

I went to my other computer, logged in through the network, and rebooted again, this time without software suspend. Maybe I'll investigate later, or maybe I'll just be happy with the hardware-based features, since they have never given me problems.
elfs: (Default)
So I took the personality test at Spark.

You are an EXPERIMENTER (Dominant Introvert Abstract Thinker).

Like just 4% of the population you are an EXPERIMENTER (DIAT). Although you're slightly shy (admit it!), you love control. When a problem comes in your way, you stomp on it swiftly and decisively. You are bothered easily by failure in others and failure in yourself. You don't like people that you don't think are intelligent. Rather than arguing with them, however, you would just as soon ignore them altogether.

In relationships, you have a strong heart. And because you're introverted, people take you as someone they can trust. But the fact is that in addition to solving problems, you like to create them. So there's a decent chance that you'll cheat on a loved one. If you do, you'll likely get away with it.

You're a good person at heart, but then again, who isn't?


Fuck, that's the most accurate astrology blurb I've read in a long time. Oh, by the way, [livejournal.com profile] fallenpegasus? You matched me 73%.

Profile

elfs: (Default)
Elf Sternberg

May 2025

S M T W T F S
    123
45678910
111213141516 17
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 22nd, 2025 10:48 am
Powered by Dreamwidth Studios