Showing posts with label dumps. Show all posts
Showing posts with label dumps. Show all posts

Wednesday, July 19, 2023

Discoverable code documentation

As obvious as it seems, it matters where code documentation appears, and how discoverable it is. If the documentation exists, but nobody knows about it, it isn't very useful.

What are some ways to make documentation more discoverable and more useful? Do we need SEO for code documentation? Different type of documentation may be needed for different use cases.

Before we go into boosting discovery, what can go wrong with missing or incorrect documentation? One could face a bug from misunderstanding a library or language feature, then spend hours to reverse engineer and debug. Sometimes a developer might follow up and fill in the gap on Stack Overflow, or worse, in bug trackers (from old post).

Boosting method 1: put it in the middle of a workflow

Example 1 -- good compiler error messages. Compilers are part of most coding workflows. You just hit a problem. If the compiler error message is good, it will tell you what is wrong. Maybe it even tells you a likely fix. Maybe it gives you a link to a webpage with more details for the "why?". This helps when there is already other documentation where you learned about something in the first place, but you forgot a bit of the concrete details. So the initial knowledge helps you get to close enough to write something close to right, and the compiler reminds you how to make it right.

IDEs might go a step further and apply the fix for you. This could lead to slightly twisted workflows. You might write code that is intentionally wrong, but fewer keystrokes than the right thing, knowing that you can lean on the IDE to fix it for you in fewer keystrokes. For example, maybe the return type of a method is pretty verbose, so you might just type "sessionState = getSessionState();" and let the IDE fill it in. It's sort of like a backward autocomplete.


You can also inject information into "compiler error messages" e.g., by attaching information into a static_assert or at runtime in an assert.

Example 2 -- diagnosed from scanner tools. You hit a problem. Let's say it's a performance problem where jobs start to time out. In your workflow it is common to reach for a job status page. Maybe the job monitoring tools can scan the way you've set up the jobs, or has profiling information, and tell you about common tweaks to enhance performance. The common tweaks are documented somewhere, but maybe it is hard to remember every time, or the documentation was TLDR or not discoverable. Again, requires some knowledge to get started, but the pointers help polish. Another example could be static analyses that report problems and remind you of a documented sharp corner or footgun.

Downsides

  • not for learning in the first place
  • not for every use case (e.g., assumes common tools for workflows)
  • documentation ends up scattered, e.g., within string literals in the source code of tools
    • might be hard to internationalize/translate, since docs are not organized well for translation teams to work through and know when there is an update that also needs translation

Boosting method 2 -- standard location

Example 1 -- javadoc, docstrings, and other forms of method comments are nicely discoverable because by convention, you know where the documentation should be. These are great for learning in the first place. In some cases, there is convention for where to find test cases or example code that you can learn from as well.

It might not be nicely ordered for learning like a book or lessons/tutorials, but it could be good for learning small bits like a single API that is independent of other APIs.

IDEs can also take advantage of this convention to gather up "quick docs":


One weird issue I've found is when you start having some indirection or aliases, then it's not clear which alias has the right comment doc. E.g., absl's flat_hash_set hides most of its implementation in an internal base class raw_hash_set. The public documentation is where you expect: in the public flat_hash_set header file. However, the method body isn't there. So navigation through a code search web app or an IDE will probably lead you to the internal raw_hash_set header file. There is documentation there too, but it is not useful ("this overload kicks in when ...").

Example 2 -- the word of mouth for good references. E.g., word of mouth might indicate that Wikipedia is a high quality source, or cppreference.com is a great place to learn APIs in the C++ standard library, or learn parts of the language with a nice index and search (vs reading through the ISO C++ standard) search. Or stackoverflow might have a good reputation for finding answers to common problems.

Downsides

  • reference-form documentation may be good for learning one independent unit at a time. Also assumes some background. It won't have a lesson plan to help you learn a larger topic from scratch.
  • can get out of date if you update the code but forget to update the docs

Boosting method 3 -- rank highly in search

Search engines that work well might rank things highly in Boosting method 2 example 2 instead of relying on direct word of mouth. It might also show hits for places you don't expect to have good information, like bug trackers.

Boosting method 4 -- advertise in small chunks

E.g., break useful information into small 1-pagers.

  • send out a weekly newsletter or a "tip of the week"
  • or share with peers in code reviews and other conversations
  • or advertise in social media

Or break things out into X min chunks that can fit into a tech talk or podcast.

Or have a reading group for larger documents (though doesn't scale as well).

LLMs

 It's 2023. LLMs are hot. How can they help here?

Already done: chat interface where you ask the LLM and the LLM gives you a summary or generates code and maybe explains each step.

Otherwise (and mostly if the above fails and you need to learn more yourself):

  1. downsides from many of the boosting methods are that they are:
    1. not good for first time learning, but more for small units of learning or reminders 
    2. scattered
    3. Can an LLM digest all the scattered documentation and synthesize a better organized tutorial or lessons or books?
    4. Generate a system diagram or some more visual "summary".
  2. a downside of javadocs and embedded in workflow/code docs is they aren't great for having translations. Can an LLM help translate?
  3. detect when documentation is incorrect or out of date after changes to source code?
  4. generate missing documentation from code (parameter x must be sorted, or other important invariants)?
  5. generate example code that is good for further learning?
  6. synthesize the highlights of a step by step evaluation in the form of slides, vs what a debugger would show, which may be more verbose?
  7. convert tech talk videos to text summaries
Not great? 4 doesn't seem like a good thing to do, even if it was possible. Writing comments can help you better understand if your written code makes sense, or if an API is "good" or if it has too many sharp corners. It's sort of like rubber duck debugging, but makes you review the code and design to avoiding shipping bad APIs.

Wednesday, November 17, 2010

Nicole Scherzinger - Poison / TWEWY - Twister

A bit of a pointless post, but I noticed that the beginning of Nicole Scherzinger's Poison


samples from The World Ends With You:


There is even a guy with headphones at the beginning of the video =)

Monday, February 1, 2010

"Sprinkles" on English Muffins

Random thought: What do you call the "sprinkles" on the top of an English muffin? Is it just a kind of bread crumb (i.e., it's just crumbled English muffin)?

Friday, August 28, 2009

Kiss Kiss Bang Bang

Hot on the heels of my Netflix post, I just finished watching Kiss Kiss Bang Bang and noticed that Michelle Monaghan was in Gone Baby Gone as Angie Gennaro, but her KKBB character was in a commercial for Genaro's Beer.



I am too bored.

Netflix

On Recommendations: They recommended Kangaroo Jack to me because I liked Ratatouille and Kung Fu Panda. To their defense they also recommended Ice Age, which I actually did like. Why don't they consider the number of stars as well? Maybe there just aren't enough >= (4 - \epsilon) starred movies to go around (Kangaroo Jack had 3 + \epsilon, so maybe it's not that bad). I wonder when they will incorporate improvements from the Netflix competitions.

On old movies / tv shows: Do they make more money off of folks who rent old movies? Old movies are already shown for free on public TV, basic cable, and even online. Oh well, I should rent a movie based on its utility to me, not them, anyway. On a related note, I recently enjoyed the train station scene from The Untouchables (too young when it was first released).



It's much better to let y'all see that scene in context than to post the isolated youtube clip.

Wednesday, April 15, 2009

Phoenix Wright: Ace Attorney

The Phoenix Wright series is awesome.

If only there was a way to convert theorem prover queries into amusing court cases and have children of all ages help us find contradictions.

Misc:



http://objection.mrdictionary.net/index.php

+ the whole slew of youtube videos (e.g., this, this')

Wednesday, December 17, 2008

Saturday, December 13, 2008

answers.yahoo.com

I am under the impression that there are MORE products that people care about than people who care enough to review products (professionally). Example: I want to know how the PERFORMANCE of an AMD 4450e compares to the older AMD 6000+ (which has the higher product number). Should I trust the product number? Yes in that case, but how do I compare an ATI 3870 vs an ATI 4670?

When product-line-explosion creates review problems you basically have to go to a forum, Amazon customer reviews, or something like answers.yahoo.com. Still, I find many questions unanswered. Maybe there is still a need to just go into a store and ask for some advice (if only the associates where helpful and unbiased).

Anyway, I found it amusing that people use answers.yahoo.com to answer HotOrNot-like questions:

http://answers.yahoo.com/question/index;_ylt=AmHWfryoIcwqCrVw05k8OCQSxgt.;_ylv=3?qid=20081213163120AACAgkV

GM + ads + guitar

My co-advisor and officemates had a lengthy, multi-part debate Friday about GM, the bailout, the environment, and ads.

Btw, I also got a guitar on Friday.

Anyway, the thought that came to mind is that GM's commercial during the '08 Olympics were great. This despite the fact that it didn't make me want to buy a GM car. What it did make me want to buy was a Brandi Carlile CD (the ad used her song "The Story"). I saw a similar pattern in 2007, where an Old Navy ad had a catchy song that I wanted to buy, but I had no immediate interest in the sweaters they were selling.

Ads these days actually promote more than one product and more than one brand. I wonder if they ever pool money together and share the cost of the ad instead of having one party pay the other to license their work. I guess the common case is General Megacorp + Starving Musician. In the past it was harder to Joe S. to identify Starving Musician from the ad and purchase a CD. These days, you can just do a Google search. I don't know if it makes sense for GM to pay SM when SM didn't even need to customize the work for the ad.

Anyway it probably doesn't matter (peanuts compared to, say, $14 billion dollars).

Wednesday, April 2, 2008

Annotations, and No such thing as a stupid response?

I recently came upon an article Abstraction Penalties, Stack Allocation And Ownership Types when looking for uses of ownership types in C. It's an interesting article, and does highlight some of the problems w/ compiler optimizations: you never know when it doesn't do an optimization that it should be able to do.

The primary problem is that escape analysis is expensive and fragile and compilers don't do it very well. A secondary problem is that if you change your program so that escape analysis no longer works, the only way to tell is that your performance gets mysteriously worse.

Of course, it would be a nightmare to see every failed optimization, but it would be nice to know when it matters. I think his take on the problem is to allow annotations for critical code so that the compiler either
  1. successfully optimizes
  2. fails to optimize but shows a counterexample
Of course, you still have some problems
  1. You have to identify the bottlenecks
  2. You have to realize that the bottleneck can be fixed w/ optimization X that can be done if only the compiler knew about Y (assuming the code generation is at fault in the first place).
  3. What if the problem isn't one bottleneck, but many? Every time pattern A, pattern B, ..., and/or pattern Z shows up in your code, the compiler treats it conservatively.
  4. You raise the bar for a standard-compliant compiler. Sure, you already expected a decent compiler to do the requisite static analysis + optimization, but now programmers expect it to respond to the annotations (when previously it silently skipped the optimization).
  5. The code becomes hideous (maybe not so bad w/ an IDE or nice text editor). The annotations go w/ every declaration (class, field, and function signatures) and object instantiation.
For things like pre-conditions and post-conditions, you can "modularize" the annotations (define a condition somewhere and say the function requires the same condition), but if the annotation is supposed to go along w/ every declaration, what can you do?

Well his idea (and an idea used in Cyclone and probably others?) is to have sane defaults (if the annotation isn't present assume X), along with some inference. Of course, now you have to modify old code that doesn't conform to the defaults, but I guess those folks can just use a different mode of the compiler?

Overall it really does seem like what Robert wants is regions (his annotations are very similar to the region annotations, hierarchy of lifetimes, defaults, etc.), but he wants to extend it to data structure hierarchies (If my stack internally is represented by a list, the list does not outlive the stack) and allow better optimizations. Also, he had a cool suggestion of allowing casts (which in a region framework would copy the data to the other region).

Anyway, I got a laugh out of one of the responses to the blog post:

XXXXX: Your assumptions are all wrong... that's what java will be doing. It already infers 'escape detection'...

You should read up on 'eden' garbage collection systems. This is basically how it works: ... The 'eden' system has one heap page where ALL new objects are created. Everytime eden is full, each object in eden that is *STILL* accessible from some place is copied over to the real heap...
And Robert's reply:

You clearly haven't read what I wrote. And why don't you use the term "copying collector" like the rest of the world?

Monday, March 31, 2008

No such thing as a stupid blog post?

We've all heard our teachers say, "Don't worry, there's no such thing as a stupid question!". Well I wonder if the same applies to blog posts. I recently came upon a blog post about what great software should have. The intro was over 1 page long, and I'm sure the whole thing could have been a 10 page paper. Needless to say, I didn't really read it, but thanks to the bold font, I picked up a few points:
  • The guy is impressed with OSes, Emacs, Firefox, and the JVM
  • The guy is not impressed with console games
  • His #1 criterion for great software is that software should not require reboot
  • He notices that all great software come with a command line shell
I am impressed by some of the same software, but I don't think they are at the level that he thinks they're at. Firefox did not fit the "does not require reboot" criterion until recently (memory leaks and fragmentation). Also, I think you could beat most of the Mario games in one sitting if you wanted (and you had to for the NES ones)...

Anyway, I don't think it's bad. Just like a stupid question, it stirred up some discussion (I think he had 96 responses).

Friday, December 28, 2007

+-

This year I fixed a lot of bugs after looking at diffs, but to get diffs you have to make changes (or have non-determinism).  I guess this post is a review of changes and diffs from the year.

Changes that seem good:
  • drinking tea for caffeine instead of coke
  • objects instead of modules + functors in my ocaml code (even though lots of people seem to hate objects in ocaml -- I still hate objects for certain things)
  • turn during snowboarding w/out swinging arms
  • first stay on the East coast
  • first trip to Europe
  • first internship (even though it was still a research environment)
  • played cricket for the first time
  • bought a digital camera
  • bought a mouse for my laptop
  • more vim (in addition to emacs)
  • read some decent books
Changes that aren't as good:
  • even less contact with old friends (at least we're on facebook?)
  • less cooking
  • less movie watching? maybe that's not true
  • less math
Changes that go both ways:
  • new office
  • more time in the office
  • started this blog, and filled it with crap that I probably feel differently about now
  • new template for this blog
  • started using other web-apps like recommendation-based web radio
  • testing Safari for windows
Changes I'd like to see:
  • reverse some of the negative changes
  • waste less time online
  • waste less time offline, testing different applications (like Safari)
  • start working on things earlier
  • be more responsive with email
  • have more interesting things to put in this blog (i.e., live a more interesting life)
  • more importantly, have more interesting things to talk about
  • draw more
  • write more
  • learn a music instrument
  • do more math
  • do anything to work more of the brain
So after I see the diff I'm supposed to do some kind of analysis, decide what's worth fixing, and end up fixing a fraction of the things that are worth fixing.

Tuesday, July 17, 2007

Cheaper, Low Quality Transportation

Given the "power" of the internet, we should be able to schedule ad-hoc rides on the cheap.

Paxis - Taxis that run on a public on-demand schedule? Pack those cars up with people who have similar sources and destinations to be more efficient. I guess these are actually the same as Shuttles. Oops!

Practus - "Buses" that use Drivers-Ed students. The students get practice by actually driving people around. The person riding shotgun should know two things. (1) Directions. (2) How to drive. Finally, the car may be one of those cars with a passenger-side brake.

Come on!

Thursday, June 14, 2007

Practice makes perfect?


I've always wondered what separated 90%-accurate free throw shooters in the NBA from the 80% folks, the 76%ers, and lower. I'm not convinced that it's just practice. I'm not sure how much Sam Cassell practices anymore, but he hit 88% of his free throws last year. Lebron must practice like crazy and he only hits 70%. It's not all "talent" either, is it? People can get better, to some degree. Are some forms just more consistent? Is it mentality? Basically, is it coachable? Shaq did hire a free throw coach, and hit a high of 62.2% in the 2002-2003 season (before retreating to 42.2% last season).

I believe in coaching, but in most cases I've only experienced beginner levels. Snowboarding and tennis: I remember both as being quite frustrating at first but enjoyable with just the slightest bit of advice. And of course, there's driving. Nobody would let you on the road for the first time without watching a few videos and sitting with an instructor.

Of course not everything is fun and sports.  I suppose you can say that you receive a lot of coaching in school, and it seems reading, writing, and communication are the primary focuses for most people.  That's fair.  That's most of what others see about you.

Anyhow, I haven't enjoyed a writing class since English 1A. I have a feeling my writing and communication skills flattened-out. That's not to say that my style has not changed; it has.  In particular, I don't uses ellipses as much anymore, but the phrase "in particular" is everywhere now. What hasn't changed is my  tendency to use "anyway/anyhow/any***" as a cop-out when I don't have a good transition.

Anyway, this is practice. Reading, in a way, is also practice. I suppose practice is all I can do.  I can't stay in school forever, and I wouldn't want to either.

Wednesday, April 18, 2007

Don't Huff and Puff, just Huff... the VT tragedy and the ensuing debate

This is probably not the best time to debate -- as one Reddit poster said, "Can we at least let the corpses get cold first?". I'm sorry; I don't trust my memory, so I'm just going to take my brain dump while I still remember what I want to say. My condolences to the friends and families of the 33 involved. What happened was terrible...

So, this morning I was just reading a terribly cute story my niece wrote about a metaphorical bout between the Sun and the Wind. Well, I'm not going to post her story, but the moral of it was that you can't get what you want from people by just "huffing and puffing" at them all of the time. Overall, very impressive for a six year-old.

Well, tonight I finally sat down and read about the VT shooting. I read the accounts of those who "knew" the shooter. I read the accounts of those who witnessed the events, and the heroic stance made by a particular professor. I read about the fears (and hopefully, isolated instances) of racial backlash. And, of course, I tried to soak in both sides of the gun debate.

Now, I honestly don't know all the points of each side, but what I gather from each side:
  1. Pro-carry-conceal (I think that's the group): Presence of other armed and sane individuals can contain an incident. This often does not require firing a gun. Also, countries that do not restrict gun ownership have fewer incidents. Gun laws don't do anything: the shooter wasn't a criminal until Monday
  2. Anti-carry-conceal (I don't know the exact fancier name): friendly fire, confusion, and other reasons for escalation. More isolated/singleton shootings, e.g., during a drunk bar-fight, may occur. The US may turn Wild Wild West (it has before, right?). If things aren't that extreme, at least we may all live in fear (or with just a hint of fear) of offending others, as many are now armed.
Well, I don't think people need guns to subdue or contain incidents. There must be something less extreme. After all, even with a gun, containment does not require firing it.
  • Tazers? Those take skill to aim (I'm not sure if it works through thick clothing)
  • Pepper spray? Range is probably too short
  • Guns -- with infinite clips. No.
  • Guns -- with one-bullet clips. Like an old musket. Actual-shooters will be less effective (reload time) and accidental-shooters can only make one mistake. Perhaps such one-balled gunmen will only intimidate.
Anyway, I don't get why debates always consider the extremes. I find that most solutions are a compromise.

Friday, March 30, 2007

Damn-age

Not much of an update -- just some recent screen caps:

Some Yahoo! Sports employee having a little fun (maybe a King's fan)

Multiple solutions left to the constraint solver (me) -- oops!

As you can see from these screen-caps, I've been taking a break (spring break) after submitting my first paper. Yay (hope it's accepted)!

Other than fantasy bball and minesweeper, I've been reading To Live by Yu Hua. It's about life in China around the Cultural Revolution. It's not as strange as The Past and the Punishments, but it's a tear-jerker. The writing is simple, and just seems to flow; there are no chapter breaks, which is the total opposite of The Da Vinci Code and Angels and Demons. With chapters, there are obvious spots for the author to leave cliffhangers. Without chapters... it seems like the author is obligated to maintain your interest all the time (generalizing here, obviously). Ultimately, this is also true of The Da Vinci Code as each chapter is about 3 pages long.

Finally, I've been catching up on One Piece (thanks crunchyroll.com). Definitely my favorite anime/manga. This may be a bit of a stretch, but I think it's like a modern Water Margin (aka Outlaws of the Marsh -- the novel that inspired Suikoden). Come on,
  • pirates travel on water
  • "Water" is a substring of "Water Margin"
  • ???
Well, One Piece references many cultural/historical figures so it's not surprising if it also references Water Margin.

Wednesday, January 24, 2007

My lips don't seal

For 23 years I did not have chronically dry lips and I did not use Chapstick. I don't understand why I have them now.


In my first two years of grad school, I developed a habit of "biting" my lower lip when thinking. I don't think that's the cause, as I think I've ditched that habit.

Anyway, let's go back to the beginning. Last April I developed a single blister on my lower lip after doing the Taste of Uptown/Hillcrest (if I remember correctly, Hash House-a Go Go was excellent). Within one or two weeks, the blister progressed from cracks and peeling to severe oozing/inflammation over both lips. I went to an urgent care center where they attributed the problem to sunburn and prescribed antibiotics and 1% hydro-cortisone. The oozing and inflammation stopped.

After a few weeks under the care of hydro-cortisone, I tried to wean myself of it but the cracks were back. I consulted the school clinic twice. One doctor gave me a stronger (2%) hydro-cortisone(?!). Wow, I still remember how much that stung. The next doctor told me that hydro-cortisone thins the skin if used too long. However, his only advice was to try an assortment of alternatives (Vaseline, Chapstick, Blistex, etc.) and give it time.

Well, it's been about 9 months. I could have produced a baby by now if I was a girl and pregnant. My lips still seem dry, but in a different way. It seems like it's encased in a low polygon-count shell instead of soft skin. I've stopped using Chapstick since about August and just drink lots of water, so it's probably not an addiction problem. Oh well, time to stop thinking about it.

Wednesday, January 17, 2007

Chess 4

For some reason people like to post their new year resolutions or TODO lists publicly. I assume it's not so much about attention as it is about permanence. Blogs are more robust than cocktail napkins (though I can only think of phone numbers fading from napkins, and those are different kinds of to-do lists).

Anyway, here's one bullet from my to-do list that's been carried over from past years. I want to make a 4-player chess computer game. I guess people like pictures, so here's one:



Yeah, this is not the most important thing in the world, but it seems like a good excuse to try other programming languages/frameworks. One good thing about delaying this production from 2005 and 2006 is advances in my own knowledge and available programming tools makes this easier to complete. E.g., if I make it a desktop app (like TetriNet), I'd probably write it in Erlang (language where network communication should be easy). Of course, as the years go on, my own time will be worth more. Hopefully, thee critical point has not passed yet.

Possible feature list:
  1. It would be cool to make the game extensible. I know at least two ways to play chess with 4 people (with different board shapes even) and it would be nice to support other variants with little effort. The rules/board description can be written in a domain-specific language and the core game/communication logic can be reused.
  2. On the extensibility front, the "community" should be able to submit other variants and chess end-games for these new variants. Yay, I think that covers a Web 2.0 paradigm.
  3. Save/load. Never lose a users data, right? It should be easy, since it's like loading end-games.
  4. Replays. Again, shouldn't be so hard if serialization is done right.
  5. Send game configurations to your friends to see what they would do in similar situations. They could reply with the replay.
  6. Should have chat. Bryon R. once said, "Every application should have chat".
  7. A wise-man once said something like "Before you think about making another application (e.g., a web calendar), ask yourself it will help you or others get laid". I suppose chess 4 doesn't cut it with just these features (except maybe chat). Whatever feature 7 is, it'd better help people get laid (or at least give that impression like Myspace).

UPDATE: Bah... looks like someone's already done Chess 4 and explored the variants idea 100x deeper than I had planned: http://www.pathguy.com/chess/ChessVar.htm. The problem is, his chess applets run on a single machine; you can't play against a distant opponent, and obviously there's no chat.

UPDATE2: Seems like most of the features are elements of Starcraft/Warcraft

Sunday, January 14, 2007

Bad Games?

What's more painful to watch?
  • D-Wade shoots 23 free throws with a total of 99 free throws between the two teams. As a side note, I can't wait till Corey Maggette is traded to the Spurs, and the Spurs (w/ Ginobli and Maggette) play against the Heat (with Wade and Shaq). Bucket-fulls of free throws ensue.
  • A blowout such as this one (but it's "your" team that won).
  • Sacramento loses five in a row during their home-stretch, where 3 games went to overtime. My mom went to Arco Arena to watch the latest OT loss (to Houston), and Yao Ming didn't even play because of injury. EDIT: My mom ended up not going, but the losing streak is now 6.

Wednesday, January 10, 2007

Thinking about thinking

Most of what I do is find bugs in computer programs, but every once in a while, I sit and think about what might be wrong with my own thought process. The conclusions are usually laughable, but not funny

Example 1 (High latency):

Problem: I consider myself a slow thinker. At least, that's my excuse for being quiet person -- almost never dominating a conversation. By the time I think of something to say, others are already on a different topic
  1. When I get a haircut, I usually ask to have the hair on the back/bottom of my head cut higher. Raise that line. It usually never happens.
  2. One day, I share my haircut experiences with my brother, and he says the same thing happens to him. However, the barber once explained to him that his neck is real long and if there's no hair covering it, people will notice!
  3. Maybe I'm like my brother, and I have a long neck?
  4. Brain signals from body parts further from the head take longer to arrive at the brain (shoulder tap vs foot tap experiment)
  5. Longer neck == slower thinker?
  6. Haha right. I'd like to think my brain does the thinking, so a longer neck means nothing

Example 2 (Paging in):

Problem: It's very common for people to forget what they learn. Lagrange multipliers? Hell if I remember. I'd only remember where to look for a reference. Now, what I'm worried about is whether or not my daily routine accelerates this.
  1. At "work" (i.e., school), I often need to look through GIGABYTES of boring text. Logs for debugging my own code, other people's code to see if the possible bugs my analysis program discovers are false positives (btw, if you know an efficient way to do that, let me know), etc. Sure this exercises the brain, but it teaches very little.
  2. In undergrad CS classes, a common exercise is: look at what happens to caches with an LRU replacement policy when the working set is bigger than the cache. You get thrashing!
  3. The amount of crap that streams through my brain probably exceeds whatever cache-like mechanism is in my head, hence the constant need to look things up again.
  4. Thrashing in cache is probably not so bad because you still have other levels in the memory hierarchy that are relatively fast. Once you hit the disk though, you may as well forget about your computations ever finishing.
  5. Is every useful thing I know on "disk" now?

Oh sorry, now that you've read this crap, you'll need to page things in as well =)