elfs: (Default)
[personal profile] elfs
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.

Date: 2003-07-22 04:11 pm (UTC)
ext_3294: Tux (Default)
From: [identity profile] technoshaman.livejournal.com
Coolness. Functional, huh? I always did think this object abstraction introduced a lot of glop that didn't necessarily have to be there...

I gotta learn Python some time. There's a lot of blood on the floor over whether Perl is easier to write (thanks to syntactic sugar making it easier for the editor to keep track of where the hell it is you are), but Python is definitely easier to read.... Perl reminds me of APL...

Date: 2003-07-22 04:12 pm (UTC)
From: [identity profile] ashley-y.livejournal.com

The fourth "Forth" style is stack-based. It's the same one PostScript uses. For instance, 3 4 5 + * . will print out 27 (the . is the print command). Its advantage is that it's very simple and easy to implement.

But functional is my preference. If you're really interested in the functional style, you should check out Haskell (http://haskell.org/).

code examples

Date: 2003-07-22 04:13 pm (UTC)
From: [identity profile] popefelix.livejournal.com
do you have bits of your code available for people to look at? I try to be concise in my coding, but I have a feeling that my code still suffers from a bit of bloat.

Congratulations!!

Date: 2003-07-22 04:17 pm (UTC)
From: [identity profile] ouranophobe.livejournal.com
Sounds a right sexy hack! A nice realisation, isn't it? :)

Date: 2003-07-22 07:48 pm (UTC)
From: [identity profile] johno.livejournal.com
I'm slowly coming to the point where I accept that about myself too.

I'm damn good at my job. I have a innate understanding of how the system works. I can design and implement very complex system changes. I can even articulate how it works and what the changes mean to my co-works and bosses.

Thanks for crystallizing that realization for me.




From: [identity profile] wolfwings.livejournal.com
...well at least this one does. It's mostly for some random MU* servers but Forth-like languages (without the silly 'pages' of the older forth implementation) are still going quite strong, but I very definately agree that Forth is a language with it's own programming style that nothing else can, or should, duplicate.

And it's a style I find remarkably intuitive and easy to program in when I'm just banging out code to test an idea before building it again more properly in some other language, as if I get something wrong it breaks where I got it wrong, no sooner, no later, so I can find flaws in my ideas faster.

Date: 2003-07-23 03:35 pm (UTC)
From: [identity profile] j5nn5r.livejournal.com
This is why, when I found out we were both competing for the same job at your company, I had no doubt you were:
1) more qualified
2) should get the job
3) I'd be happy about it

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. 12th, 2025 02:22 pm
Powered by Dreamwidth Studios