I get strongly annoyed driving the speed limit. When the road is open, and the sky is bright, it calls for driving at a speed safe for conditions, not a bureaucrats idea of a safe speed for worst case conditions. But I drive the speed limit anyway.
Coming home from JAARS yesterday, I hit a pothole. My dashboard died. Every gauge went all the way over to zero. I continued my way home, and noticed about fifteen minutes into the drive that I was feeling strangely joyous. After few minutes of thinking I figured out the reason.
You see, while I am driving I take short, almost subconscious, looks at the speedometer. If it is at or above the speed limit I am sad. If it is below the speed limit I am happy, since I could drive faster if I wanted too.
Without my conscious mind noticing, I was checking my dead speedometer, and coming up happy every time.
I want a Phlink. But sadly, I have no excuse to get once, since I don't have a land line, and only use a cell phone.
I am annoyed at my PIM's. They have no concept of linking. I added another contact, who maintains my aunt's web site. Their is no way to link him to my aunt so that two years when I need to call "that guy that does my aunt's website" I can just go to my aunt and find him.
Or take todo items, or calendar entries. Last night I wrote up a plan to get something done. Along with it, I have several appointments I need to make, and todo items to do. But thier is no link between the plan document and the todo items referencing it or links to the conversation that sparked the plan.
PIM's today are a bloody mess. They understand lists of things in folders. That is fundamentally the wrong approach.
Grandmother cam down from Williamsburg for a one night visit. As always she has lots of stories to tell about the international students she meets. (She lives very near the college of William and Mary) We heard about the 15 year old physics genius from Indonesia studying for her Doctorate and and who spent the blackout staying at grandmother's.
After hurricane Isabel, a student from Turkey was very impressed with the way everyone pulled together to get things cleared up, and with the random strangers from out of town that showed up to repair buildings. "Your city is better than the city I come from. This is amazing. In my city none of this would be cleaned up. We would still be under trees, and everyone would be yelling and hating everyone else. The difference is that you are Christians."
Tom Chi wonders if sitting still is the cause of most bad ergonomics.
I know my desk at home is not comfortable to work from for long periods of time. But all the "ergonomic solutions" I have seen to not seem to make much difference. The concept of being able to move around easily while working might be the key.
MCIV: "But what if the plane crashes, and I end up floating in the ocean, clinging to a piece of wreckage? Not only will all the electronics be useless, but the ink would run.
M: "Oh, look: This 'Uniball Vision' pen says waterproof right on it. I'll use that to make the list."
Beth engages in some hilarious overthinking.
They mysterious person posting some of my european photos in asian bulletin boards is still doing it. Posting #3 Posting #4
Several of the pictures I took in France and Monte Carlo have been posted by some unknown person on this page, and then also on this page. Could anyone interpret the gist of the text on these pages? I just wonder what people are saying about them. ;)
Using flash to create dynamic desktop backgrounds is a fascinating idea. I just saw "swf Desktop, which claims to make doing this easy, mentioned on MacNN.
The local RC track my brother races at could have a wallpaper with photos of last week's race, and schedule information in on the next week's race...
There I was a few years ago, doing unholy things emulating on my linux router a particular online game's flaky game-listing server (it used it's own binary protocol). I was merrily coding away poring through a packet sniffer dump, and then coding with PHP and TCPSERVER.
Suddenly a concept hit me. Everything in linux is a file. Everything. I was awestruck. Since everything was a file, and every programing language I had seen could read and write files, that meant that I could do anything I wanted to do with any programing language I wanted to use. I had to walk outside and get a fresh air. Because everything was a file, I could do everything with just a bit of coding.
The computer was no longer a mysterious beast, but a trusted inanimate object that I could wield to do my will.
Today, while reading though Eric Raymond's, _The Art of Unix Programming_ for the first time, I came upon a section entitled, "What Is the Operating System's Unifying Idea?". I eagerly began reading it. Eric said, "The most important of these are probably the "everything is a file" model..."
Both Martin Fowler and Simon Willison are talking about using Xpath with the coding language of your choice, as a much simpler alternative to XSLT.
I have been monkeying around with Xpath in PHP using Php.XPath.
Good sign you have a redneck for a brother:
When the phrase "The best defense is good offense" comes up when he is talking about preferred driving style.
Good sign you are a nerd:
When your redneck brother asks, "You wore that to work today?!"
A passive radar system that uses cellphone towers to track every vehicle on the road! So the this Business Week article screams - at least to my privacy liking mind. (Link via Gizmodo)
Here is an actual company's site on Celldar. From looking at the diagrams, one of it being used to watch traffic, I see there is nothing magic here. Someone finally is making use of all that "free energy" that is constantly being emitted from known fixed points.
My envy level has just climbed a little higher. Looks like they will be eating well at the awesome Zap Your PRAM conference.
I was within an inch of disabling comments on my site last night. Since I started braino.org to last week, I have only got two comment spams. This week they started attacking. Yesterday I had to delete 11 of them.
This morning I saw Mt-Blacklist, and I'm hoping it will allow me to keep comments open.
Gotcha. The tireless Avi Bryant ;) explains where continuations should be used. It makes sense. Now I understand.
Avi Bryant replied with a few questions to my last post about continuations. I'll pop back some answers in a minute.
My biggest issue with continuation based programing is not the details of how it works. Programming with web sites using continuations seems to put the application in the drivers seat. Letting the application drive is easier to program for (See, I admitted it. :) And I do grok that aspect of continuations). But, this goes utterly against the most basic underlying strength of world wide web - that the web is as stateless as possible. That statelessness encourages many of the positive ways we work on the web and also encourages disparate data from totally different sources to be tied together.
Let's take a small project I was working on last week. It's an online questionnaire of "professional skills" done for the HR guys at that company so they can give up attaching word docs to emails. On the web admin back-end, and HR guy can pick a person, and view that persons competed data (the questions of which are customized to the jobs the person is interested in and the type of "employee" the person is.)
So, written to my understanding of continuations, we would have something like:
def personDetailsApp person = get-person() showPersonDetails(person) end
- personPicker.rb
#passing in where the picker should go to showPersonPicker("personDetails.rb")
- personDetails.rb
#person coming from request vars showPersonDetails(person)
The HR user pops in, picks a person, and gets their details. In both sets of code all is easy and well. This is a really trivial example, maybe too trivial.
But in real life on this project, that simple continuation style code would not have worked for me. First, HR guys need to email around links to a persons info. Also there was another, non web based, HR app that we quickly modified so that from a person's details in the app, you could push a button and their web browser would launch pointing at that person's questionnaire. Because of the stateless way the site was programmed (except for authentication), both of these required no modifications to the sites code at all. Heck, someone could spend five minutes and make a javascript bookmarklet that would let an HR guy highlight someone's name on the internet and pull up their info.
Logically, there is no reason why picking a person on a web based form must proceed viewing their details. By using the stateless style, any program, web based or not, my code or not, that can generate a url with the users name in the query string can direct an authorized user to the person's details.
It is this disconnect between individual "pieces" on the web that allows so much rich intertwinglyness.
With continuations, at least as far as I can see, this is lost and has to be explicitly added? And explicitly adding "statelessness" would defeat the purpose of continuations?
Now you guys are smart people, and you use and love continuations, therefore there is probably still perhaps something I'm missing. Any pointers on where to look for it?
----
In Avi's comments on his post, he says "managing flow (continuations vs. state machines)". Rather than a state machine, what I am usually trying to build is an application with very little required flow - almost stateless. (Yes, you have to register to use the system. And if you visit a page without logging in, it lets you log in, and then puts you back to the page you first requested.)
I do agree that continuations would be better than stateless for multipage forms, but I don't usually use multipage forms. :P
----
The above in this post is the major thing I see with continuations. The following is just a few replies to Avi's post and is a side show from my main quest for wisdom.
What's the first page the user sees? How obvious is this?
There is not one. That's the whole point. The first page the user sees depends on wether the data was submitted or not. If they did not submit anything, they get a form that allows them to. If something external to this code is putting the amount and rate data in, then they see the result.
What's the order of pages the user sees after that? If this isn't fixed, what determines the order?
Again, that's the entire point. :P If incorrect data is submitted, they get a page displayed that lets them fix it. If good data, they see the answer.
How would I change the order if I wanted to? If say, I decided I wanted to ask for amount first, and then rate, how many different pieces of code (and templates!) would I have to change?
I'm cheating, and asking both at once, as you mentioned in the comments. :P So their is no order.
Say I had to ask for 10 different variables instead of 2. How would I abstract the validation code so that I could reuse it easily?
My orginal code is indeed ugly. It follows the principle of Do The Simplest Thing That Could Possibly Work. Real code would have the error checking inside a calculator object. and reuse of validation methods would be easy. My old example could be rewritten as:
$amount = $_REQUEST['amount']; $rate = $_REQUEST['rate']; $action = $_REQUEST['action']; if($action == "calc"){ $calc = new interestCalculator(); $calc->setData($amount, $rate); if($calc->validData()){ showResult($calc->answer()); }else{ //Passing in an array of errors to be displayed showForm($calc->getErrors()); } }else{ showForm(); }
But of course, I am still comparing using one form to Chris' code using multiple ones.
(Remember, the second half of this post is minor. First part is the meat of the matter.)
Three good responses to my post on continuations. Patrick Logan explains continuation based web coding as "calling the user", which is a clear term for the fuzzy thoughts that have been floating around in my head. Cris Double shows some simple example code. Avi Bryant demonstrates tradtional web programing in terms of a IO named Ptth.
My background on contination based web programming: I've used Ruby continuations in non web coding. And I've read the "A Walk on the Seaside" tutorial. Along with the examples just given, I think I have good understanding on what site programming with continuations is. I see how it could be a good way of doing a tricky set of registration forms.
The concept that bugs me though is the same concept that makes continuations easier to code certain things with - that it is "calling the user from within the code". When I'm programing, I am trying to make the site user driven, not code driven. I want someone to be able to send a URL over email, and the other person get what they were expecting.
A URL to me represents either a particular piece of data, or a particular action that could be done by submitting the form displayed. At least in the examples of continuations I have seen, the URL's get hosed. :)
Here is the "Ptth" example coded in php - but without the ptth. :P (So maybe it's not fair). ($t is my handy template class. Yes, it would be a clearer example if I did not use it, and yes this example is not perfect. )
$amount = $_REQUEST['amount']; $rate = $_REQUEST['rate']; if( $amount != "" && $rate !=""){ if(! $amount > 0){ $t->assign("message", "Amount must be greater than zero"); $t->display("interestForm.html"); }else if(! $rate > 0){ $t->assign("message", "Rate must be greater than zero"); $t->display("interestForm.html"); }else{ $result = $amount * rate; $t->assign("result", $result); $t->display("interestResult.html"); } }else{ $t->display("interestForm.html") }
So the effect of this is that a user goes to the url, which is of an "action" page, and gets a form. When If their data validates, the action is done. If it does not validate, they get an error, and can change their data.
At least with an example this simple, continuations don't have much of an advantage. Is there an open source project using continuations well? Then I could look in the source and see how they are used in the real world.
I almost can't believe how stunning this time lapse movie of the toronto is. Defiantly watch the high res version. (Link via decafbab)
Makes me wish someone had a real digital camera taking high res pictures like this all day. Gorgeous shots like these updating every five minutes would make a heck of a desktop. :)
John Robb writes that "The fact is that no major conventional power has ever won a LIC[low intensity conflict] in the last 50 years."
Of the top of my head I remember the Huks. In Philippines in the mid 1940's to mid 1950's the communist Huks were on the verge of controlling the Philippines. The insurrection begun with a combination of the disillusion of the newly freed Filipinos with their new government and power hungry communist gorillas. Two brilliant men, one US, and one Filipino almost "single handily" ended it over several years. [Update: Maybe this does example does not count as a major power war, although the us was supporting the Philippines.;)]
It's a fascinating tale - here's a full book on the Hukbalahap Insurrection.
Update: The "Malay Emergency" was a bloody 13 year "low intensity conflict" won by the British. It pretty soundly counts. :)
It's time to clean out some tabs.
Handrawn Holograms: Just as soon as I get my hands on some Lexan... (Via decafbad)
RC Camera Car: My brother and I are now inspired to mount a camera on his E-Maxx. Watching the video of the camera car sneakily push an ash can down the stairs was the final straw. We have to do this.
Dyson Telescope Game: Good flash based puzzle game.
Color Scheme: Great tool to experiment with web site color schemes.
KataEighteen: I love Dave's code kantas.
Texan Pride: I once worked with a intern software developer from Texas. In the test version of her site when registering, there were only two options to choose for "State". One was "Texas". The other was "Looser State".
Aww. Gus Miller of VoodooPad fame just got engaged.
Via reinvented, I have found a new favorite Text to Speech program. IBM's Text to Speech is incredibly realistic when compared to everything else.
http://stopabductions.com/ - THIS WEBSITE TELLS YOU HOW TO MAKE A THOUGHT SCREEN HELMET, THE MATERIALS AND TOOLS YOU NEED TO MAKE ONE, AND WHERE YOU CAN OBTAIN THE MATERIALS
And quite frankly, it's a howl reading this site. You probably don't want to miss a page - every page has some special sayings.
Remember:
Results of the thought screen helmet exceeded expectations. Since 2000 aliens have not taken any abductees while they were wearing thought screen helmets using Velostat shielding. See Case Histories and Testimonials.
I have wanted to put an apple laptop in my car for a while. Macs are easily scriptable, and would make the perfect hackable car computer.
Maybe next time I get a laptop the old one goes into the car. ;)
Avi Bryant's elevator pitch (found via Decafbad) for using continuations in web site programing, goes like this:
Continuations bring precisely the same benefits to traditional web development that subroutines bring to GOTOs
Maybe I have not fully grokked continuations, but to me treating a "page" as a a method of an object makes more sense to me for 97% of things I do.