D$Web
Help, I'm trapped in an ugly website...
2009 11 16 - outsourcing politics
I don't care about politics. I should, but it just sounds like a lot of work. I don't read political blogs or whatever those paper things with news in them are called, so I only become aware of when an issue is particularly high profile, like President Bush's incompetence (or feigned incompetence).
There should be a way to outsource caring about politics. Something like the electoral college on a much more granular scale. A group of 10 people or so elect or hire someone they actually know, and that person cares about politics for them. That person is responsible for staying informed on "the issues", and giving the rest an executive summary. The electorate can either vote themselves or defer their votes to their elector.
2009 11 12 - an asymptote of programming evolution
There was a recent Hacker News discussion on whether yet another programming language (in this case, Google Go) was really needed. I'm going to quote a comment I made, because I want to put more mental energy into this idea:
Writing a program is maybe 10% what you want it to do, and 90% telling the computer how to do it. So I think the question of when we won't need another programming language can be answered as: when the default programming language of the day has libraries and/or syntax that grow to include every "how" that's been done before. This way you only have to specify the "what" unless you're doing something nobody's figured out how to do.
So I guess my idea of the limit programming language/environment would be that it's automatic (or at least trivially easy) to make 90% of every new program into a gem, and then automatic/trivial to find the gem that does exactly what you need, as well as to debug it. (maybe rubygems are already this good, i haven't looked into them).
The comment was here.
This oversimplifies a bit. First, I used the word "gem", but I'm not necessarily talking about Ruby, although Ruby's gems are a good place to start: in other words, you add the gem name to your program, and the library is automatically downloaded for your use.
Second, a library with no documentation is almost as good as no library at all. But if you're gemifying 90% of the program as you create it, presumably you're also commenting it.
Third, most libraries are going to have bugs the first couple hundred times around. So when somebody uses a library, they need the source code and their fixes need to be able to make it upstream.
Fourth, at least today, different programming languages suit different purposes. Sometimes you need to talk directly to the hardware, and sometimes you want syntax for GUI stuff. Sometimes garbage collection makes sense, and sometimes it makes more sense. Sometimes concurrency is important, sometimes it's not. The syntax of the limit language would need to be able to change to fit all these uses. You may think I'm describing Lisp here, but you may need a bit more syntactic sugar than what Lisps of today provide (or not? I have much to learn in the Lisp department).
Some of what I'm describing might already exist, and maybe if it became codified in a language it would be syntactic sugar for gems plus github plus google. I need to look into this more. The guiding philosophy for the search is this:
If something's already been done it should be trivial to do again.
2009 10 29 - background fail
I like sigils. They are pretty. So I spent the last hour playing with javascript to try and get a peek at the background image of the Errant Story site, most of which is hidden behind the actual content of the site. Pesky content.
Pasting the javascript into the address bar, I tried to hide the content. That didn't work for some reason, so I decided to just make it spit out the URLs of all the divs' background images. Here is the final-ish code I used (FireFox specific):
// remove comments and put all in the URL bar
// as one line
javascript:
newbody="<:h1>Images</h1>";
for each(elem in document.getElementsByTagName('div')){
var style= getComputedStyle(elem,'');
if (style){
var bgi=style.getPropertyValue('background-image');
if(bgi && bgi != "none"){
alert(bgi);
//// what i wanted to do:
// newbody +="<img src='" + bgi +
// "'/><br/>\n";
}
}
}
document.write(newbody);
Strangely, when I tried to append to the newbody variable, the script failed. I should probably install FireBug, but I didn't feel like it tonight. I ended up using alert() and copy/pasting each URL.
When I looked at the images at those URLs, the sigil was nowhere to be found. It's actually hidden in the transparent header.png, but only shows up in front of background.jpg. So I wrote an HTML page to show just those images (borrowing the stylesheet from the original). But when I did this, I discovered that the part of the sigil hidden behind the main div is actually... Not There. I bet those chinese characters actually say something about the cake being a lie.
2009 10 28 - Linear Temporal Collective Consciousness
Yesterday I was playing N, after having some rum-n-root. I got to the fourth level of episode 04 ("curvaceous") and kept trying to beat it. This involves going through a puzzly level and dying a lot, sometimes getting zapped, sometimes shot, most of the time blown up.
I imagined what it was like to be the ninja. Each successive time you die, and each time you are born again. Each time you start from the beginning of the level, and yet you learn from the mistakes of the last ninja. You are one ninja, but you are also many ninjas. It struck me that this is a form of collective consciousness.
In real life we also experience something like this. We don't exactly get do-overs, but every day we shut down. Our thoughts die out of our main memory, and the exact person we were that day is gone. But our memories are reborn the next morning. Hopefully we are successful in cooperating with our future and past selves.
2009 10 18 - portal: prelude beaten
I didn't really like the gameplay of the end fight in Portal: Prelude, and there were a couple glitches, but I still recommend the game. I do think it played out pretty well, story-wise. The rest of the end level was good, and there was a visit from some old friends from HL2, slightly enhanced with Portal-style playfulness.
Anyway, go get it!
Speaking of Portal, here's a funny video of some turrets talking.
edit: Here's a neat song summarizing the plot of Portal. Spoiler, obviously. How would one classify this, musically?
edit: Added strikethroughs because YouTube is showing commercials now.
2009 10 17 - Portal, now with 32.5% more cake
I'm enjoying Portal: Prelude, which is a fan mod and unofficial prequel to Portal. I got to the end of Portal and was like, "that's it?" It was fun and novel, and the character GLaDOS was neat, but it was too easy and too short. After beating Portal I played through it with commentary enabled. A lot of the game had to be designed to train the user, due to the unfamiliar gameplay. I think they did that quite well. The commentary also revealed that the idea for the portal mechanic came from a student project called Narbacular Drop, whose authors were subsequently hired by Valve. I tried this out, but it was even shorter, and seemed to lead up to a boss fight that never happened.
So, looking for more of a challenge I went looking for mods and found Portal: Prelude. It's much more challenging than the original game. When you start it up, there's a warning that you have to be ready to think with portals. That's true, at least more so than in the original game. The puzzles are also a bit tougher. I'm on the 19th test chamber, and I had to wonder if if it was unsolvable (hint: it's not). You start in the Relaxation Vault like in the original, but instead of GLaDOS' disembodied voice, you have white-shirted men guiding you from the rooms behind frosted glass that were empty in the original game. Their voices are synthesized, but it's well-done enough that you don't worry about it.
The Companion Cube even makes an appearance. It's like looking at pictures of somebody when they were younger. Me and the cube are friends. I'm looking forward to exploring the rest of the game with it, and I will be sure to share my cake. One thing bothers me. They mentioned grief counseling...
2009 08 15 - holy mother of god
irb(main):001:0> def fact(n)
irb(main):002:1> if (n <= 1)
irb(main):003:2> 1
irb(main):004:2> else
irb(main):005:2* n * fact(n - 1)
irb(main):006:2> end
irb(main):007:1> end
=> nil
irb(main):008:0> fact(365)
=> 25104128675558732292929443748812027705165520269876079766872595193901106138220
93741966601800900025416937617231436098232866070807112336997985344536791065387238
35997043555327409376780914914294408643160469250745101348470255460140980059079655
41041195496105311886173373435145517193282760847755882291690213539123479186274701
51939680850494072260703300124632839880055048742799987669041697343786107818534466
79668715110496538881301368361990105291800561258445494886486176829158263475641489
90984138067809999604687488146734837340699359838791124995957584538873616661533093
25355125684505604638873812970295138115186141368892298651000544094394301469924411
25557552791407604927642537402504103910564219790032896000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000
irb(main):009:0>
2009 08 05 - the heart of rock-n-roll is the beatin
Once, while I was in high school, I listened to a Red Hot Chili Peppers song, and listened for how well they stayed on the beat. We had been using a metronome in my guitar lessons, and I think I was working on sticking to steady tempo. But at the time I don't think I believed it was that important. If you're feeling the rhythm of the music, who cares if your bpm varies?
So I listened to a Chili Peppers song, and kept time in my head, to see how they varied the tempo. To my surprise, they stayed dead on. Dead. In a lot of songs, the tempo varies less than one might imagine, even when they're rocking the fuck out. When it actually does vary, it can be very evocative.
This reminds me of something I read in a guitar magazine once: while the audience will forgive the occasional bum note, they'll really notice it (consciously or not) when you unintentionally vary the tempo. So you have to develop a sort of mental metronome, or better yet, a kinesthetic one.
2009 06 17 - slight return
Whoah, it's been a while since I've blogged. I've been busy with a new job, so I guess that's my excuse. It's gov't contract work. I'm working with a couple programmers from whom I think I can learn a lot, and I think it's challenging in mostly the right ways. The server I'm working on right now is made of some pretty crazy legacy code in C++. For fun, I'm going to try and convince them to let me rewrite it in Erlang. It does seem to be the kind of thing you'd want to use Erlang for.
So, step 1: learn Erlang. I started reading a tutorial on it last night. The syntax is very Prologgy. This is not a bad thing, and having learned some Prolog, it's pretty intuitive. It seems easier in that you can actually return a value, instead of binding your result to an out parameter.
A plus: built-in message passing. The server I'm working on, for better or worse, uses message passing to communicate among its parts. Erlang gives each process a message queue for free.
2009 02 28 - disqus comments
My comment system rather sucks. I'm replacing it with Disqus comments. Comments on old posts will still be visible. If it works, this post should be the first with the Disqus thingy.
To contact me, e-mail cathodion at gmail.com.