Noah Sussman's research notes
Last edited November 29, 2008
More by Noah »
Three common mistakes in JavaScript / EcmaScript - Tales from the Evil Empire
weblogs.asp.net/bleroy/archive/2005/02/15/Three-co...
I like the: if(typeof(VariableName)=='undefined'){...} It works fine.
Schneier on Security: Identity Theft Study
www.schneier.com/blog/archives/2007/11/identity_th...
While identity thieves used a wide combination of methods, fewer than 20 percent of the crimes involved the Internet. The most frequently used non-technological method was the rerouting of mail through change of address cards. Other prevalent non-technological methods were mail theft and dumpster diving.
The easiest way to kill all the Dashboard widgets is by killing the Dock (Dock is the parent process to Dashboard), don’t worry, the Dock will automatically reload in the Finder. Open up the Terminal and type the following:
$ killall Dock

http://osxdaily.com/2007/03/10/free-up-system-memory-by-killing-dashboard-widgets/

-l strips newlines on input, and adds them on output. Use this option by default, unless the newlines need special handling, or for efficiency reasons.
 this does chomp() on every line of input, and $_ .= "\n" on every output
Labels: bash
Nabble - tortoisesvn - users - new user, questions about deletions
www.nabble.com/new-user,-questions-about-deletions...
Oblio wrote:
> I guess, specifically, it's only when dealing with deleted directories
> -- "Entry has no URL".

When you delete a directory, you *must* commit everything that's shown
in the commit dialog. The reason behind this is that Subversion only can
commit removed directories if you commit recursively - and a recursive
commit means you can't exclude something from it, so you must commit
everything. So just don't deselect any entry in the commit dialog, then
TSVN can do a recursive commit.
NASA Night Launch :: Firefox Add-ons
addons.mozilla.org/en-US/firefox/addon/4908
:::::::::::::::::::::: Extras ::::::::::::::::::::::

To watch the spectacular night launch of Discovery on December 9, 2006, type the following address into Firefox (in the Location Bar at the top, after installing this theme and restarting Firefox with this theme selected).

chrome://global/skin/extras/video.html

In a perfect hacker world, anyone pissed off enough to open up a control box near a traffic light and take it apart to make it work better should be perfectly welcome to make the attempt. Rules which prevent you from taking matters like that into your own hands are too ridiculous to even consider abiding by. This attitude helped the Model Railroad Club start, on an extremely informal basis, something called the Midnight Requisitioning Committee. When TMRC needed a set of diodes, or some extra relays, to build some new feature into The System, a few S&P people would wait until dark and find their way into the places where those things were kept. None of the hackers, who were as a rule scrupulously honest in other matters, seemed to equate this with "stealing." A willful blindness.

All information should be free.

If you don't have access to the information you need to improve things, how can you fix them? A free exchange of information, particularly when the information was in the form of a computer program, allowed for greater overall creativity. When you were working on a machine like the TX-0, which came with almost no software, everyone would furiously write systems programs to make programming easier Tools to Make Tools, kept in the drawer by the console for easy access by anyone using the machine. This prevented the dread, time-wasting ritual of reinventing the wheel: instead of everybody writing his own version of the same program, the best version would be available to everyone, and everyone would be free to delve into the code and improve on that. A world studded with feature-full programs, bummed to the minimum, debugged to perfection.

Search DOM elements with XPath (getElementById too slow) - comp.lang.javascript | Google Groups
groups.google.com/group/comp.lang.javascript/brows...
mainly I develop server-side with .NET
but I'm finding very interesting and poweful "the client side of the
force"
To enable write access to a repository, you need to edit the conf/svnserve.conf file in your repository directory.
Horizontal Emotes 
入力できる顔文字の一覧 - Input Method Editor - Microsoft Office Online
office.microsoft.com/ja-jp/ime/HA101030001041.aspx
(>_<)
入力できる顔文字の一覧 - Input Method Editor - Microsoft Office Online
office.microsoft.com/ja-jp/ime/HA101030001041.aspx
(^_^;) (-_-;) (~_~;)
入力できる顔文字の一覧 - Input Method Editor - Microsoft Office Online
office.microsoft.com/ja-jp/ime/HA101030001041.aspx
(・_・;) (・・;) ^^; ^_^;
入力できる顔文字の一覧 - Input Method Editor - Microsoft Office Online
office.microsoft.com/ja-jp/ime/HA101030001041.aspx
(^_-)
入力できる顔文字の一覧 - Input Method Editor - Microsoft Office Online
office.microsoft.com/ja-jp/ime/HA101030001041.aspx
((+_+))
入力できる顔文字の一覧 - Input Method Editor - Microsoft Office Online
office.microsoft.com/ja-jp/ime/HA101030001041.aspx
(o|o)
入力できる顔文字の一覧 - Input Method Editor - Microsoft Office Online
office.microsoft.com/ja-jp/ime/HA101030001041.aspx
<(`^´)>
入力できる顔文字の一覧 - Input Method Editor - Microsoft Office Online
office.microsoft.com/ja-jp/ime/HA101030001041.aspx
(^^)/
入力できる顔文字の一覧 - Input Method Editor - Microsoft Office Online
office.microsoft.com/ja-jp/ime/HA101030001041.aspx
(@_@)
入力できる顔文字の一覧 - Input Method Editor - Microsoft Office Online
office.microsoft.com/ja-jp/ime/HA101030001041.aspx
(ーー;)
入力できる顔文字の一覧 - Input Method Editor - Microsoft Office Online
office.microsoft.com/ja-jp/ime/HA101030001041.aspx
(^_^)/~
入力できる顔文字の一覧 - Input Method Editor - Microsoft Office Online
office.microsoft.com/ja-jp/ime/HA101030001041.aspx
(=_=)
Article - A Guide to Anime Emoticons
www.iit.edu/~jfas/articles/animeemoticons.html
U_U
Article - A Guide to Anime Emoticons
www.iit.edu/~jfas/articles/animeemoticons.html
;_;
Article - A Guide to Anime Emoticons
www.iit.edu/~jfas/articles/animeemoticons.html
>_<#
Hiroette.com ||| Japanese Facemarks(Smileys) |||
club.pep.ne.jp/%7ehiroette/en/facemarks/list_index...
('-'*)
Hiroette.com ||| Japanese Facemarks(Smileys) |||
club.pep.ne.jp/%7ehiroette/en/facemarks/list_index...
^)_(^
Hiroette.com ||| Japanese Facemarks(Smileys) |||
club.pep.ne.jp/%7ehiroette/en/facemarks/list_index...
<(_ _)>
Hiroette.com ||| Japanese Facemarks(Smileys) |||
club.pep.ne.jp/%7ehiroette/en/facemarks/list_index...
 ( _ _)
OS/360 - Wikipedia, the free encyclopedia
en.wikipedia.org/wiki/OS/360
After his experience running the System/360 project, and later specifically in charge of the (by then long overdue) OS/360, Frederick P. Brooks wrote his acclaimed and famous book, The Mythical Man-Month, based on the problems encountered (and lessons learned) during the project. He cited OS/360 as a very realistic and comprehensive example of the second-system effect.
 I did not realize that OS/360 was the project that inspired The Mythical Man Month.
Test::Tutorial - A tutorial about writing really basic tests - search.cpan.org
search.cpan.org/~mschwern/Test-Simple-0.71/lib/Tes...
Although you can write almost any test with a generic ok(), it can't tell you what went wrong. Instead, we'll use the is() function, which lets us declare that something is supposed to be the same as something else
Test::Tutorial - A tutorial about writing really basic tests - search.cpan.org
search.cpan.org/~mschwern/Test-Simple-0.71/lib/Tes...

to be even more flexible, we use no_plan. This means we're just running some tests, don't know how many. [6]

    use Test::More 'no_plan';   # instead of tests => 32

now we can just add tests and not have to do all sorts of math to figure out how many we're running.

Test::More - yet another framework for writing test scripts - search.cpan.org
search.cpan.org/~mschwern/Test-Simple-0.71/lib/Tes...
The basic purpose of this module is to print out either "ok #" or "not ok #" depending on if a given test succeeded or failed. Everything else is just gravy.
OS/360 - Wikipedia, the free encyclopedia
en.wikipedia.org/wiki/OS/360
OS/360 was late being delivered, due to a combination of organizational disarray inside IBM and lack of experience with the pitfalls of large software projects, as well as the significant technical challenges. Originally scheduled for delivery in 1965 (for the simplest versions) and 1966 (for the more complex ones), it ended up being a year late — it was not released in its first production versions until 1966 and 1967 (PCP and MVT, respectively).
 bit of computer history that sometimes comes up in conversation
appleJAC Macintosh Users: Mac OS X/Windows Vista file sharing, printer sharing issues: fixes
applejac.typepad.com/applejac_macintosh_users/2007...

As described by Apple Discussions poster ydc:
Actually you will need to make a change on your Vista machine to enable this, but you can do it without the Group Policy editor or the Security Policy editor.

To do it:

  1. Click Windows Visa Start Orb
  2. In search box, type "regedit" and return
  3. Once regedit opens, click File -> export to make a backup copy
  4. Navigate to ComputerHKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsa.
  5. n the right pane, right-click the "LmCompatibilityLevel" key and select "modify"
  6. Change the value from 3 to 1
  7. Exit regedit and you should now be able to properly authenticate to your Mac OS X (or other Samba) share.
 I spent too much time searching for this answer.  Vista FTL

> Click Windows Visa Start Orb

<3 "Start Orb"
behind "Web 2.0" are many important milestones in Internet evolution.
Now blogs, podcasts and vlogs are expanding into unfamiliar terrain as people combine them with other Internet tools and explore novel ways to share the resulting material. Once again we are struggling for language to describe the new things people are doing online. Words fail us as we try to tell pals about the material we just edited at the open encyclopedia Wikipedia, the thoughts we posted about a stranger's home video at video-sharing site YouTube, the ratings we gave news stories at Digg, or the music annotations we shared at TagWorld
cruft: /kruhft/

[very common; back-formation from crufty]

1. n. An unpleasant substance. The dust that gathers under your bed is cruft; the TMRC Dictionary correctly noted that attacking it with a broom only produces more.

2. n. The results of shoddy construction.

3. vt. [from hand cruft, pun on ‘hand craft’] To write assembler code for something normally (and better) done by a compiler (see hand-hacking).

4. n. Excess; superfluous junk; used esp. of redundant or superseded code.

5. [University of Wisconsin] n. Cruft is to hackers as gaggle is to geese; that is, at UW one properly says “a cruft of hackers”.

The case-sensitivity of attribute names and values in selectors depends on the document language.
In XML 1.0 [XML10], the information about which attribute contains an element's IDs is contained in a DTD.
1day for asian... - Manhattan - Chowhound
www.chowhound.com/topics/353402
Cantoon Garden on Elizabeth
Where to take Chinese visitors if they are sick of Western food? - Manhattan - Chowhound
www.chowhound.com/topics/421683
I found people coming from China to be less impressed by fusion Asian food. Since they are used to Peking cuisine, you can bring them to either Oriental Garden on Elizabeth St. for fresh seafood or Chatham Square 6 (note: not Chatham Square 9 which is a hole-in-the-wall) for Cantonese. Oriental Garden is slightly more upscale (and also more expensive), but they have more variety of fresh seafood.
And if it doesn't work with webmail, you've lost before you've even begun, so don't do something dumb like requiring a plugin. The trick you want to accomplish is that when one person is using your software, it suddenly provides value to that person and their entire circle of friends, without the friends having had to do anything at all. Then, later, you pull the friends into the fold: if one of them starts using the software, they become their own hub, and get the benefit they have already witnessed from a distance.
If it's not HTML hanging off our friend's home page that can be viewed in any browser on a public terminal in a library, the bar to entry is too high and it's useless.

"How will this software get my users laid" should be on the minds of anyone writing social software (and these days, almost all software is social software).

"Social software" is about making it easy for people to do other things that make them happy: meeting, communicating, and hooking up.

If you want to do something that's going to change the world, build software that people want to use instead of software that managers want to buy.
Vegetarian takes Manhattan - Manhattan - Chowhound
www.chowhound.com/topics/389812
the bahn mi place on grand street between mott & elizabeth has 4 kinds of veg bahn mi (vegetabe, tofu, fake chicken, and curry fake chicken) but no seating
Meme Washer » Blog Archive » MediaWiki on Mac OS X 10.3/Jaguar
onemorebug.com/blog/2006/04/06/mediawiki-on-mac-os...
just had an IP address, no hostname. When I put in the direct ip of my machine, fine. As soon as I switched to a subdirectory, 404. It was the UseCanonicalName directive in the httpd.conf file. Once I set that to off, everything was fine.
 On configuring Apache for a test environment (LAN behind the firewall)

Should also set the ServerName directive to the IP address of the machine, otherwise the comptuer name will still get used when symlinks are followed.
maximum character length of class and id names - comp.infosystems.www.authoring.stylesheets | Google
groups.google.com/group/comp.infosystems.www.autho...
On Tue, 28 Nov 2000 17:12:41 -0800, in
comp.infosystems.www.authoring.stylesheets Dylan Schiemann

<dyl...@yahoo.com> wrote:
>Is there a defined maximum character length for the names of classes and
>ids?  If so, where is this defined in the spec.?  Thanks,

From Goldfarb, page 330 [8-10]

  "The normalized length of the attribute specification list
   is the sum of the normalized lengths of each attribute name
   and attribute value specified, which can not exceed the
   'ATTSPLEN' quantity."

I.e. the total length of the list of attributes and values, as given for
an element, can not exceed the value stated for 'ATTSPLEN' in an SGML
declaration, after the attribute list has been normalized.

'ATTSPLEN' is set at 65536 in the SGML declaration for HTML4.01

  http://www.w3.org/TR/html4/sgml/sgmldecl.html

Liskov substitution principle - Wikipedia, the free encyclopedia
en.wikipedia.org/wiki/Liskov_substitution_principl...
Let q(x) be a property provable about objects x of type T. Then q(y) should be true for objects y of type S where S is a subtype of T.

We're interested only in simulating the exception condition, and not re-creating it -- doing the latter more easily leads to confusion. Suppose a novice developer on your team chooses d:/doesNotExist as the test case's invalid file location. She passes the tests on her machine and integrates her changes. Now you run the tests on your machine, which just happens to have d:/doesNotExist on the filesystem: Maybe it's left behind from a test case of yours that didn't tear itself down correctly. The test unexpectedly fails, not because the code is wrong, but because the test depends too much on the environment around it.

This wastes time. You spend 30 minutes isolating the cause of the problem, 15 minutes explaining to the novice developer why d:/doesNotExist was a risky choice, and 20 minutes crafting a note to the rest of the team, warning them against such coding practices. Of course, when someone new joins the team, it will probably happen again. Writing a single mock deployer with a method called doNotFindAnyFiles allows you to avoid such annoyances.

The Law of Leaky Abstractions - Joel on Software
www.joelonsoftware.com/articles/LeakyAbstractions....
even as we have higher and higher level programming tools with better and better abstractions, becoming a proficient programmer is getting harder and harder.
The Law of Leaky Abstractions - Joel on Software
www.joelonsoftware.com/articles/LeakyAbstractions....
mitya.pp.ru/chamberlen/hackers/epilogue.html
mitya.pp.ru/chamberlen/hackers/epilogue.html

institution that was anarchistic and very great," he would explain. "If I told people it's possible to have no security on a computer without people deleting your files all the time, and no bosses stopping you from doing things, at least I could point to the AI lab and say, 'Look, we are doing it. Come use our machine! See!' I can't do that anymore. Without this example, nobody will believe me. For a while we were setting an example for the rest of the world. Now that this is gone, where am I going to begin from? I read a book the other day. It's called Ishi, the Last Yahi. It's a book about the last survivor of a tribe of Indians, initially with his family, and then gradually they died out one by one."

That was the way Richard Stallman felt. Like Ishi.

"I'm the last survivor of a dead culture," said RMS. "And I don't really belong in the world anymore. And in some ways I feel I ought to be dead."

Richard Stallman did leave MIT, but he left with a plan: to write a version of the popular proprietary computer operating system called UNIX and give it away to anyone who wanted it. Working on this GNU (which stood for "Gnu's Not Unix") program meant that he could "continue to use computers without violating [his] principles." Having seen that the Hacker Ethic could not survive in the unadulterated form in which it had formerly thrived at MIT, he realized that numerous small acts like his would keep the Ethic alive in the outside world.

All Patterns - Yahoo! Design Pattern Library
developer.yahoo.com/ypatterns/page.php?page=lifecy...

What's a Pattern?

A pattern describes an optimal solution to a common problem within a specific context.

From the IAWiki:

Patterns are optimal solutions to common problems. As common problems are tossed around a community and are resolved, common solutions often spontaneously emerge. Eventually, the best of these rise above the din and self-identify and become refined until they reach the status of a Design Pattern.

Each pattern has four primary components:

  1. a title
  2. a problem
  3. a context
  4. a solution
ffun with diff

one of the reasons Armani has built such an incredible empire is he is very careful with every aspect of his image. For example, when you take a photo of Armani he will not look up at the camera until he has set his pose and checked every element of his look. You cannot take a picture of him until he is ready.
diff - Wikipedia, the free encyclopedia
en.wikipedia.org/wiki/Diff#Usage

In the context format, any changed lines are shown alongside unchanged lines before and after. The inclusion of any number of unchanged lines provides a context to the patch. This output is accepted as input to the patch program. The format introduces greater readability for humans and reliability when applying the patch. These are lines that have not changed between the two files, and so can be used as a reference to locate the chunk's place in a modified file and find the intended location a change should be applied regardless if the line numbers no longer correspond. This intelligent behavior isn't possible with the traditional diff output.

...

A "!" represents a change between lines that correspond in the two files. A "+" represents the addition of a line, while a blank space represents an unchanged line. At the beginning of the patch is the file information, including the full path and a time stamp. At the beginning of each hunk are the line numbers that apply for the corresponding change in the files. A number range appearing between sets of three asterisks applies to the original file, while sets of three dashes apply to the new file. The chunk ranges specify the starting line number and the number of lines the change hunk applies to in the respective file.

diff - Wikipedia, the free encyclopedia
en.wikipedia.org/wiki/Diff#Usage
Many projects specifically request that "diffs" be submitted in the unified format, making unified diff format the most common format for exchange between software developers.
diff - Wikipedia, the free encyclopedia
en.wikipedia.org/wiki/Diff#Usage
The chunk range for the original should be the sum of all contextual and deletion (including changed) chunk lines. The chunk range for the new file should be a sum of all contextual and addition (including changed) chunk lines. If chunk size information does not correspond with the number of lines in the hunk, then the diff could be considered invalid and be rejected.
diff - Wikipedia, the free encyclopedia
en.wikipedia.org/wiki/Diff#Usage
Most diff implementations remain outwardly unchanged since 1975.
Exclusive or - Wikipedia, the free encyclopedia
en.wikipedia.org/wiki/Xor
exclusive disjunction is a logical operation on two logical values, typically the values of two propositions, that produces a value of true just in cases where exactly one of its operands is true.
Refactoring (Fowler, Beck, Brant, Opdyke & Roberts)

To explain intention and implementation separately. Choosing the name of each class and the name of each method gives you an opportunity to explain what you intend. The internals of the class or method explain how the intention is realized. If the internals also are written in terms of intention in yet smaller pieces, you can write code that communicates most of the important information about its own structure.

Refactoring: Improving the Design of Existing Code by Martin Fowler; Kent Beck; John Brant; William Opdyke; Don Roberts


Here is the refactoring game: Maintaining the current behavior of the system, how can you make your system more valuable, either by increasing its quality or by reducing its cost?

The most common variant of the game is to look at your program. Identify a place where it is missing one or more of the benefits of indirection. Put in that indirection without changing the existing behavior. Now you have a more valuable program because it has more qualities that we will appreciate tomorrow.

Contrast this with careful upfront design. Speculative design is an attempt to put all the good qualities into the system before any code is written. Then the code can just be hung on the sturdy skeleton. The problem with this process is that it is too easy to guess wrong. With refactoring, you are never in danger of being completely wrong. The program always behaves at the end as it did at the beginning. In addition, you have the opportunity to add valuable qualities to the code.

There is a second, rarer refactoring game. Identify indirection that isn't paying for itself and take it out. Often this takes the form of intermediate methods that used to serve a purpose but no longer do. Or it could be a component that you expected to be shared or polymorphic but turned out to be used in only one place. When you find parasitic indirection, take it out. Again, you will have a more valuable program, not because there is more of one of the four qualities listed earlier but because it costs less indirection to get the same amount from the qualities.


Refactoring: Improving the Design of Existing Code by Martin Fowler; Kent Beck; John Brant; William Opdyke; Don Roberts

if a refactoring changes a published interface, you have to retain both the old interface and the new one, at least until your users have had a chance to react to the change. Fortunately, this is not too awkward. You can usually arrange things so that the old interface still works. Try to do this so that the old interface calls the new interface. In this way when you change the name of a method, keep the old one, and just let it call the new one. Don't copy the method body—that leads you down the path to damnation by way of duplicated code.

Refactoring: Improving the Design of Existing Code by Martin Fowler; Kent Beck; John Brant; William Opdyke; Don Roberts


you should avoid refactoring is when you are close to a deadline. At that point the productivity gain from refactoring would appear after the deadline and thus be too late. Ward Cunningham has a good way to think of this. He describes unfinished refactoring as going into debt. Most companies need some debt in order to function efficiently. However, with debt come interest payments, that is, the extra cost of maintenance and extension caused by overly complex code. You can bear some interest payments, but if the payments become too great, you will be overwhelmed. It is important to manage your debt, paying parts of it off by means of refactoring.

Refactoring: Improving the Design of Existing Code by Martin Fowler; Kent Beck; John Brant; William Opdyke; Don Roberts

The object programs that live best and longest are those with short methods. Programmers new to objects often feel that no computation ever takes place, that object programs are endless sequences of delegation. When you have lived with such a program for a few years, however, you learn just how valuable all those little methods are. All of the payoffs of indirection—explanation, sharing, and choosing—are supported by little methods (see Indirection and Refactoring on page 61).

Since the early days of programming people have realized that the longer a procedure is, the more difficult it is to understand. Older languages carried an overhead in subroutine calls, which deterred people from small methods. Modern OO languages have pretty much eliminated that overhead for in-process calls. There is still an overhead to the reader of the code because you have to switch context to see what the subprocedure does. Development environments that allow you to see two methods at once help to eliminate this step, but the real key to making it easy to understand small methods is good naming. If you have a good name for a method you don't need to look at the body.

The net effect is that you should be much more aggressive about decomposing methods. A heuristic we follow is that whenever we feel the need to comment something, we write a method instead. Such a method contains the code that was commented but is named after the intention of the code rather than how it does it. We may do this on a group of lines or on as little as a single line of code. We do this even if the method call is longer than the code it replaces, provided the method name explains the purpose of the code. The key here is not method length but the semantic distance between what the method does and how it does it.

Refactoring: Improving the Design of Existing Code by Martin Fowler; Kent Beck; John Brant; William Opdyke; Don Roberts

I've been asked, "Is refactoring just cleaning up code?" In a way the answer is yes, but I think refactoring goes further because it provides a technique for cleaning up code in a more efficient and controlled manner. Since I've been using refactoring, I've noticed that I clean code far more effectively than I did before. This is because I know which refactorings to use, I know how to use them in a manner that minimizes bugs, and I test at every possible opportunity.

I should amplify a couple of points in my definitions. First, the purpose of refactoring is to make the software easier to understand and modify. You can make many changes in software that make little or no change in the observable behavior. Only changes made to make the software easier to understand are refactorings. A good contrast is performance optimization. Like refactoring, performance optimization does not usually change the behavior of a component (other than its speed); it only alters the internal structure. However, the purpose is different. Performance optimization often makes code harder to understand, but you need to do it to get the performance you need.

The second thing I want to highlight is that refactoring does not change the observable behavior of the software. The software still carries out the same function that it did before. Any user, whether an end user or another programmer, cannot tell that things have changed.



Refactoring: Improving the Design of Existing Codeby Martin Fowler; Kent Beck; John Brant; William Opdyke; Don Roberts

I strongly believe that a good design is essential for rapid software development. Indeed, the whole point of having a good design is to allow rapid development. Without a good design, you can progress quickly for a while, but soon the poor design starts to slow you down. You spend time finding and fixing bugs instead of adding new function. Changes take longer as you try to understand the system and find the duplicate code. New features need more coding as you patch over a patch that patches a patch on the original code base.


A good design is essential to maintaining speed in software development. Refactoring helps you develop software more rapidly, because it stops the design of the system from decaying. It can even improve a design.


Refactoring: Improving the Design of Existing Codeby Martin Fowler; Kent Beck; John Brant; William Opdyke; Don Roberts

The Rule of Three

Here's a guideline Don Roberts gave me: The first time you do something, you just do it. The second time you do something similar, you wince at the duplication, but you do the duplicate thing anyway. The third time you do something similar, you refactor.



Refactoring: Improving the Design of Existing Code by Martin Fowler; Kent Beck; John Brant; William Opdyke; Don Roberts

Ubiquitous personal computing in /Snow Crash/

Нейл Стефенсон. Снежная лавина (engl)
lib.ru/INOFANT/STEFENSON/snow_crash_engl.txt
Gargoyles represent the embarrassing side of the Central Intelligence Corporation. Instead of using laptops, they wear their computers on their bodies, broken up into separate modules that hang on the waist, on the back, on the headset. They serve as human surveillance devices, recording everything that happens around them. Nothing looks stupider; these getups are the modern-day equivalent of the slide-rule scabbard or the calculator pouch on the belt, marking the user as belonging to a class that is at once above and far below human society. They are a boon to Hiro because they embody the worst stereotype of the CIC stringer. They draw all of the attention. The payoff for this self-imposed ostracism is that you can be in the Metaverse all the time, and gather intelligence all the time.
Нейл Стефенсон. Снежная лавина (engl)
lib.ru/INOFANT/STEFENSON/snow_crash_engl.txt
Gargoyles are no fun to talk to. They never finish a sentence. They are adrift in a laser-drawn world, scanning retinas in all directions, doing background checks on everyone within a thousand yards, seeing everything in visual light, infrared, millimeter-wave radar, and ultrasound all at once. You think they're talking to you, but they're actually poring over the credit record of some stranger on the other side of the room, or identifying the make and model of airplanes flying overhead. For all he knows, Lagos is standing there measuring the length of Hiro's cock through his trousers while they pretend to make conversation.
Нейл Стефенсон. Снежная лавина (engl)
lib.ru/INOFANT/STEFENSON/snow_crash_engl.txt
"How can you be goggled in if you're walking down a street?" Then the terrible reality sinks in: "Oh, my God, you didn't turn into a gargoyle, did you?" "Well," Hiro says. He is hesitant, embarrassed, like it hadn't occurred to him yet that this was what he was doing. "It's not exactly like being a gargoyle. Remember when you gave me shit about spending all my money on computer stuff?" "Yeah." "I decided I wasn't spending enough. So I got a beltpack machine. Smallest ever made. I'm walking down the street with this thing strapped to my belly. It's really cool." "You're a gargoyle." "Yeah, but it's not like having all this clunky shit strapped all over your body - " "You're a gargoyle.
Learning about UI Frameworks

Rounding to 2 decimal places - comp.lang.javascript | Google Groups
groups.google.com/group/comp.lang.javascript/brows...
The easiest way to do this and keep your decimal places is to multiply the
number by 100, use math.round to round it and then divide the number by 100.
list of assets need 
Yahoo! UI Library: Graded Browser Support
developer.yahoo.com/yui/articles/gbs/index.html
Progressive enhancement puts content at the center, and allows most browsers to receive more (and show more to the user).
Optimizing Page Load Time - die.net
www.die.net/musings/page_load_time/
For objects of relatively small size (the left-hand portion of the graph), you can see from the empty space above the plotted line how little of the user's downstream bandwidth is being used, even though the browser is requesting objects as fast as it can. This user has to be requesting objects larger than 100k before he's mostly filling his available downstream bandwidth.
Optimizing Page Load Time - die.net
www.die.net/musings/page_load_time/
Load fewer external objects. Due to request overhead, one bigger file just loads faster than two smaller ones half its size. Figure out how to globally reference the same one or two javascript files and one or two external stylesheets instead of many; if you have more, try preprocessing them when you publish them. If your UI uses dozens of tiny GIFs all over the place, consider switching to a much cleaner CSS-based design which probably won't need so many images. Or load all of your common UI images in one request using a technique called "CSS sprites".
Optimizing Page Load Time - die.net
www.die.net/musings/page_load_time/
Minimize HTTP request size. Often cookies are set domain-wide, which means they are also unnecessarily sent by the browser with every image request from within that domain. What might've been a 400 byte request for an image could easily turn into 1000 bytes or more once you add the cookie headers. If you have a lot of uncached or uncacheable objects per page and big, domain-wide cookies, consider using a separate domain to host static content, and be sure to never set any cookies in it.
Optimizing Page Load Time - die.net
www.die.net/musings/page_load_time/
Try benchmarking common pages on your site from a local network with ab, which comes with the Apache webserver. If your server is taking longer than 5 or 10 milliseconds to generate a page, you should make sure you have a good understanding of where it is spending its time.
Modern browsers are currently configured to fulfill only two simultaneous requests to any given web domain at a time.
After Delays, Wireless Web Comes to Parks - New York Times
www.nytimes.com/2006/07/06/nyregion/06wifi.html?ex...

Wi-Fi Salon intends to activate 18 wireless "hot spots" by the end of next month at Battery, Central and Riverside Parks and in Washington and Union Squares in Manhattan; at Prospect Park in Brooklyn; at the Flushing Meadows-Corona Park in Queens; and at Pelham Bay and Van Cortlandt Parks and Orchard Beach in the Bronx.

Eight of the hot spots will be in Central Park and two in Prospect Park. The first of the 18 locations — a stretch of Battery Park, from the Battery Gardens restaurant to the Castle Clinton National Monument — is to be activated today, with the other 17 to follow, in stages, through the end of next month.

After Delays, Wireless Web Comes to Parks - New York Times
www.nytimes.com/2006/07/06/nyregion/06wifi.html?ex...
By the end of August, wireless networks will be established at 18 locations in 10 of New York City's most prominent parks
Procedures as Black-Box Abstractions
mitpress.mit.edu/sicp/full-text/sicp/book/node13.h...
The importance of this decomposition strategy is not simply that one is dividing the program into parts. After all, we could take any large program and divide it into parts--the first ten lines, the next ten lines, the next ten lines, and so on. Rather, it is crucial that each procedure accomplishes an identifiable task that can be used as a module in defining other procedures.
Procedures as Black-Box Abstractions
mitpress.mit.edu/sicp/full-text/sicp/book/node13.h...
a procedure definition should be able to suppress detail.
Listing of all element&#39;s classes - comp.lang.javascript | Google Groups
groups.google.com/group/comp.lang.javascript/brows...
// Determine if an object or class string contains a given class.
  css.hasClass = function(obj,className) {
    if (!defined(obj) || obj==null || !RegExp) { return false; }
    var re = new RegExp("(^|\\s)" + className + "(\\s|$)");
    if (typeof(obj)=="string") {
      return re.test(obj);
    }
    else if (typeof(obj)=="object" && obj.className) {
      return re.test(obj.className);
    }
    return false;
  };
Nabble - ydn-javascript - improved performance of 'hasClass' method
www.nabble.com/improved-performance-of-'hasClass'-...
hasClass: function(el, className) {
        var re = el.className.split(' ');
        var f = function(el) {
                return -1 != re.indexOf(className);
        };
        return Y.Dom.batch(el, f, Y.Dom, true);
},
 [14:25] Noah Sussman: what can I do on macbook w splunk?
[14:26] Ben Strawbridge: just tail /var/log and see what you find for starters. then you can also drop in any archive of logs from your webserver or whatever
[14:27] Ben Strawbridge: i learned alot about the mac just searching for * on splunk and checking out the timeline
Synergy User Guide
synergy2.sourceforge.net/
When you added the client to the server's configuration you chose a name for the client. If that name was not client's host name then you must tell the client the name you used. Instead of the above command use this instead
Sorting Select.options[] array on text or value attribute - comp.lang.javascript | Google Groups
groups.google.com/group/comp.lang.javascript/brows...

function compareOptionText(a,b) {
  /*
   * return >0 if a>b
   *         0 if a=b
   *        <0 if a<b
   */
  // textual comparison
  return a.text!=b.text ? a.text<b.text ? -1 : 1 : 0;
  // numerical comparison
//  return a.text - b.text;

}

function sortOptions(list) {
  var items = list.options.length;
  // create array and make copies of options in list
  var tmpArray = new Array(items);
  for ( i=0; i<items; i++ )
    tmpArray[i] = new
Option(list.options[i].text,list.options[i].value);
  // sort options using given function
  tmpArray.sort(compareOptionText);
  // make copies of sorted options back to list
  for ( i=0; i<items; i++ )
    list.options[i] = new Option(tmpArray[i].text,tmpArray[i].value);

}
Selecting multiple option from a select tag - comp.lang.javascript | Google Groups
groups.google.com/group/comp.lang.javascript/brows...

The - selectedIndes - property of a SELECT element is not meaningful in
a multiple select element, and the value of any OPTION element that may
be selected is only ever going to be a single value from any group of
OPTIONs selected.

To find all of the selected OPTION elements in such a SELECT element it
is necessary to loop through the - options - collection of the SELECT
element and respond to each OPTION element's - selected - property
(which is boolean, either true or false). Something like:-

var options = this.options;
for(var c = options.length;--c;){
    if( options[c].selected  ){ //true if selected.
        // do something with the - value of the selected option.
     }

}
salmon filet, slice open the center to stuff w/: bleu cheese crumbles, little honey, dash of breadcrumbs, either parm (i used oregon horseradish cheddar), pepper and broil

dash of soy sauce and drizzle w/ balsamic vinegar to finish off
 
by widget, pram and direct invocation
A List Apart: Articles: Frameworks for Designers
www.alistapart.com/articles/frameworksfordesigners
Aligning the type to a consistent baseline. This includes things like setting the margins on block level elements like paragraphs, headers, and lists to the same value as (or some multiple of) the base line-height setting for the site.
curr = el = NavFindCurrent(this.lnav);
 what does this do?  is that a language feature or a typo?
function setParents(el){ while(el.id != this.lnavId){ el = el.parentNode; if((el.tagName == 'LI') && (el.className != 'hidden')){ setCurrent(el); } } }
 parent is designated by the assignation of a "current" CSS class.  this is straightforward BUT we have to traverse the DOM every time we want to find the parent.  could be stored in a hash at the cost of an added layer of indirection
function NavFindCurrent(el){ var loc = document.location.toString(); loc = appendIndexToURL(loc); anchors = el.getElementsByTagName('A'); for(var i=0;i<anchors.length;i++){ if(loc.indexOf(anchors[i].href)>=0){ return anchors[i]; } } // if we get here, no match found in container div for current page return null; }
 tight coupling.  the current url is compared to each A tag in the menu, and we choose the current menu item because it has a target that is currently in the URL bar
function appendIndexToURL(url){ var re = /\/$/; if(re.test(url)){ url += 'index.html'; } return url; }
 interesting things going on in the tree nav... the js assumes it knows the extension of the index file...
Personal Labels - Preferences - Confluence
www.onconfluence.com/label/my:favourite

You can categorise content within Confluence using simple one-word labels. Content in Confluence can be given any number of labels, which can then be searched for, browsed, or used as filters in RSS feeds or macros.

Labels beginning with ‘my:’ (i.e. my:needsreview) are personal labels. These labels are only visible to the user who created them. Personal labels are useful for marking content that you may be personally interested in, and can be browsed from your user profile.

Great designers. The central question of how to improve the software art centers, as it always has, on people.

We can get good designs by following good practices instead of poor ones. Good design practices can be taught. Programmers are among the most intelligent part of the population, so they can learn good practice. Thus a major thrust in the United States is to promulgate good modern practice. New curricula, new literature, new organizations such as the Software Engineering Institute, all have come into being in order to raise the level of our practice from poor to good. This is entirely proper.

Nevertheless, I do not believe we can make the next step upward in the same way. Whereas the difference between poor conceptual designs and good ones may lie in the soundness of design method, the difference between good designs and great ones surely does not. Great designs come from great designers. Software construction is a creative process. Sound methodology can empower and liberate the creative mind; it cannot enflame or inspire the drudge.

The differences are not minor—it is rather like Salieri and Mozart. Study after study shows that the very best designers produce structures that are faster, smaller, simpler, cleaner, and produced with less effort. The differences between the great and the average approach an order of magnitude.

A little retrospection shows that although many fine, useful software systems have been designed by committees and built by multipart projects, those software systems that have excited passionate fans are those that are the products of one or a few designing minds, great designers. Consider Unix, APL, Pascal, Modula, the Smalltalk interface, even Fortran; and contrast with Cobol, PL/I, Algol, MVS/370, and MS-DOS (Fig. 16.1).

Figure 16.1. Exciting products


Hence, although I strongly support the technology transfer and curriculum development efforts now underway, I think the most important single effort we can mount is to develop ways to grow great designers.

No software organization can ignore this challenge. Good managers, scarce though they be, are no scarcer than good designers. Great designers and great managers are both very rare. Most organizations spend considerable effort in finding and cultivating the management prospects; I know of none that spends equal effort in finding and developing the great designers upon whom the technical excellence of the products will ultimately depend.

My first proposal is that each software organization must determine and proclaim that great designers are as important to its success as great managers are, and that they can be expected to be similarly nurtured and rewarded. Not only salary, but the perquisites of recognition—office size, furnishings, personal technical equipment, travel funds, staff support—must be fully equivalent.

How to grow great designers? Space does not permit a lengthy discussion, but some steps are obvious:

  • Systematically identify top designers as early as possible. The best are often not the most experienced.

  • Assign a career mentor to be responsible for the development of the prospect, and keep a careful career file.

  • Devise and maintain a career development plan for each prospect, including carefully selected apprenticeships with top designers, episodes of advanced formal education, and short courses, all interspersed with solo design and technical leadership assignments.

  • Provide opportunities for growing designers to interact with and stimulate each other.

 Fred Brooks, No Silver Bullet
perl.com: Perl Command-Line Options
perl.com/pub/a/2004/08/09/commandline.html?page=2#...
If you need to have processing carried out either before or after the main code loop, you can use a BEGIN or END block.
perl.com: Perl Command-Line Options
perl.com/pub/a/2004/08/09/commandline.html?page=2#...
Using -0 and giving it a hexadecimal or octal number sets $/ to that value. The special value 00 puts Perl in paragraph mode and the special value 0777 puts Perl into file slurp mode. These are the same as setting $/ to an empty string and undef respectively.
perl.com: Perl Command-Line Options
perl.com/pub/a/2004/08/09/commandline.html?page=2#...

I usually use the -l option without an argument just to add a new line to the end of each line of output. For example, I'd usually write my original "Hello World" example as:

  $ perl -le 'print "Hello World"'
perl.com: Perl Command-Line Options
perl.com/pub/a/2004/08/09/commandline.html?page=2#...
Using -0 and giving it a hexadecimal or octal number sets $/ to that value. The special value 00 puts Perl in paragraph mode and the special value 0777 puts Perl into file slurp mode. These are the same as setting $/ to an empty string and undef respectively.
SnookSurvey: Element Attributes in JavaScript - Snook.ca
www.snook.ca/archives/snooksurvey/element_attribut...
molily May 24, 2007
All comments

Brendon said: »I do prefer to use the DOM methods whenever possible«

It's a common misunderstanding that element.get/setAttribute is part of the official DOM and element.attribute is kind of proprietary. That's not entirely right. get/setAttribute is part of basic DOM Core which applies to all XML/SGML-style documents, (X)HTML amongst others. element.attribute is also standardized in DOM HTML, the special, additional DOM for (X)HTML documents.

We're using the special DOM HTML features all the time (e.g. document.body), they're handy, shorter and often faster (compare this to the DOM Core way: document.getElementsByTagName["body"].item(0)). Thus, I think it's okay to use the special DOM whenever it's possible. If it isn't (for example when dealing with non-(X)HTML nodes), fall back to DOM Core. But both techniques are officially standardized.

DOM JavaScript Cheat Sheet - Wait till I come!
www.wait-till-i.com/index.php?p=460
document.getElementById( id ) is broken in IE, and will also greedily return an element with a name matching the id specified.
Daring Fireball: iPhone First Impressions
daringfireball.net/2007/06/iphone_first_impression...

No Clipboard: Ever since the iPhone was announced, I’ve been curious what Apple planned to do with the standard Cut/Copy/Paste clipboard commands. With no menu bar, there’s no Edit menu. With no keyboard, there’s no command-key shortcuts. The Newton solved this with magic gestures. The iPhone solves this by not having a clipboard at all. No copy, no paste.

Instead, Apple has tried to anticipate where you might want to copy and paste and offer you direct commands to accomplish the same thing.

Daring Fireball: iPhone First Impressions
daringfireball.net/2007/06/iphone_first_impression...
No Clipboar
Daring Fireball: iPhone First Impressions
daringfireball.net/2007/06/iphone_first_impression...
iPhone Safari seems hyper-aggressive about keeping a low memory and resource footprint. For example, there doesn’t seem to be any sort of cache for the back button; going back loads the page again.
Daring Fireball: iPhone First Impressions
daringfireball.net/2007/06/iphone_first_impression...
I hope you like top-posting, and quoting the entire message you’re replying to. Me, I despise that style of email, but iPhone Mail doesn’t really work well any other way. One problem is that the iPhone doesn’t support the concept of selected text. That means you can’t just select a specific portion to quote of the message you’re replying to; nor can you select a chunk of the quoted message and delete it while editing. The only way to delete text is one character at a time (although the keyboard does let you press-and-hold to repeat). And to top it off, there’s no way to reply without quoting anything at all.
Daring Fireball: iPhone First Impressions
daringfireball.net/2007/06/iphone_first_impression...
Real-time dragging is such a priority that if the iPhone can’t keep up and render what you’re dragging in real-time, it won’t even try, and you get a checkerboard pattern reminiscent of a transparent Photoshop layer until it catches up (typically, an instant later). I.e. iPhone prioritizes drag animation over the rendering of the contents; feel over appearance.
Life at Google - The Microsoftie Perspective « Just Say “No” To Google
no2google.wordpress.com/2007/06/24/life-at-google-...

Google has the concept of “Tech Stops.”  Each floor of each building has one.  They handle all of the IT stuff for employees in the building including troubleshooting networks, machines, etc.  If you’re having a problem you just walk into a Tech Stop and someone will fix it.  They also have a variety of keyboards, mice, cables, etc.  They’re the ones who order equipment, etc.  In many ways the Tech Stop does some of what our admins do.  If your laptop breaks you bring it to a Tech Stop and they fix it or give you another one (they move your data for you).  If one of your test machines is old and crusty you bring it to the Tech Stop and they give you a new one.  They track everything by swiping your ID when you “check out” an item.  If you need more equipment than your job description allows, your manager just needs to approve the action.  The Tech Stop idea is genius because:

1.       You establish a relationship with your IT guy so technical problems stop being a big deal - you don’t waste a couple of hours trying to fix something before calling IT to find out it wasn’t your fault.  You just drop in and say, “My network is down.”

2.       Most IT problems are trivial when you’re in a room together (“oh that Ethernet cable is in the wrong port”)

3.       The model of repair or replace within an hour is incredible for productivity.

4.       It encourages a more flexible model for employees to define their OWN equipment needs.  E.g. a “Developer” gets a workstation, a second workstation or a laptop, and a test machine.  You’re free to visit the Tech Stop to swap any of the machines for any of the others in those categories.  For example, I could stop by and swap my second workstation for a laptop because I’m working remotely a lot more now.  In the Tech Stop system, this takes 5 minutes to walk down and tell the Tech Stop guy.  If a machine is available, I get it right away.  Otherwise they order it and drop it off when it arrives.  In our current set up, I have to go convince my manager that I need a laptop, he needs to budget for it because it’s an additional machine, an admin has to order it, and in the end developers always end up with a growing collection of mostly useless “old” machines instead of a steady state of about 3 mostly up-to-date machines.

Life at Google - The Microsoftie Perspective « Just Say “No” To Google
no2google.wordpress.com/2007/06/24/life-at-google-...
Google doesn’t place any value on previous industry experience.  (It puts tremendous value on degrees, especially Stanford ones).
Life at Google - The Microsoftie Perspective « Just Say “No” To Google
no2google.wordpress.com/2007/06/24/life-at-google-...
My manager had over 100 direct reports and is the common case for managers at Google. 
Life at Google - The Microsoftie Perspective « Just Say “No” To Google
no2google.wordpress.com/2007/06/24/life-at-google-...
Google believes that developers are, with few exceptions, interchangeable parts. 
How To Enable Javascript Debugging in Safari
www.infoaccelerator.net/index.cfm?event=showEntry&...
defaults write com.apple.Safari IncludeDebugMenu 1

This is the correct script for detecting the mouse coordinates:

function doSomething(e) {
	var posx = 0;
	var posy = 0;
	if (!e) var e = window.event;
	if (e.pageX || e.pageY) 	{
		posx = e.pageX;
		posy = e.pageY;
	}
	else if (e.clientX || e.clientY) 	{
		posx = e.clientX + document.body.scrollLeft
			+ document.documentElement.scrollLeft;
		posy = e.clientY + document.body.scrollTop
			+ document.documentElement.scrollTop;
	}
	// posx and posy contain the mouse position relative to the document
	// Do something with this information
}
games can become "management flight simulators" of sorts, letting employees manage a global workforce in cyberspace before they do so in the real world.
im in mai blog, postin' bout cats: The Cuteness of Grammatical errors : Notes from a Linguistic Myst
linguisticmystic.com/2007/02/07/im-in-mai-blog-pos...
grahamsw May 22, 2007 12:28 pm

I think there’s something besides childlikeness. The captions aren’t just misspelled, they’re *phonetically* spelled. To read them you have to sound them out. My guess is that this activates parts of the brain that don’t get used in normal reading. Why is that funny? Dunno. But it may be that it is the *reader* who becomes more childish.

For what it’s worth, the site you dare not name reminds me very strongly of the ancient http://www.fatchicksinpartyhats.com (warning: if you find ICHC too offensive you will hate the above). The grammar/spelling has a similar effect on me. Again, for what it’s worth fatchicks is undeniably offensive, rude, homophobic and damn near indefensible. But I thought it was hilarious, and the spelling/grammar made it much harder (for me) to take serious offense. If the person being rude is misspelling everything, it may make you feel superior, and hence more forgiving.

Or it may be the old advertiser/educator trick of leaving the last word off the end of the ..: if you make it so the the reader has to work to complete the thought then they have some sort of investment in its success.

disprec

If present, return data is the normal QuickBase HTML page that displays the record.

 so what this mean is that you have to put &disprec=  as the parameter.  &disprec won't work, and neither will &disprec=true :-p
Video Games - China - Money - Online Games - New York Times
www.nytimes.com/2007/06/17/magazine/17lootfarmers-...
More than eight million people around the world play World of Warcraft — approximately one in every thousand on the planet

Here is a realistic example of the try/catch statement. It uses the factorial( ) method defined in the previous section and the client-side JavaScript methods prompt( ) and alert( ) for input and output:

//not implemented until JavaScript 1.5

function factorial(x) {
// If the input argument is invalid, throw an exception!
if (x < 0) throw new Error("x must not be negative");
// Otherwise, compute a value and return normally
for(var f = 1; x > 1; f *= x, x--) /* empty */ ;
return f;
}

try
{ // Ask the user to enter a number var n = prompt("Please enter a positive integer", ""); // Compute the factorial of the number, assuming that the user's // input is valid var f = factorial(n); // Display the result alert(n + "! = " + f); } catch (ex) { // If the user's input was not valid, we end up here // Tell the user what the error is alert(ex); }

Flanagan, JavaScript: The Definitive Guide, 5th Edition

6.16. throw

An exception is a signal that indicates that some sort of exceptional condition or error has occurred. To throw an exception is to signal such an error or exceptional condition. To catch an exception is to handle it—to take whatever actions are necessary or appropriate to recover from the exception. In JavaScript, exceptions are thrown whenever a runtime error occurs and whenever the program explicitly throws one using the throw statement. Exceptions are caught with the try/catch/finally statement, which is described in the next section.[*]

[*] The JavaScript throw and try/catch/finally statements are similar to, but not exactly the same as, the corresponding statements in C++ and Java.

The throw statement has the following syntax:

throw expression;

expression may evaluate to a value of any type. Commonly, however, it is an Error object or an instance of one of the subclasses of Error. It can also be useful to throw a string that contains an error message, or a numeric value that represents some sort of error code. Here is some sample code that uses the throw statement to throw an exception:

function factorial(x) {
    // If the input argument is invalid, throw an exception!
    if (x < 0) throw new Error("x must not be negative");
    // Otherwise, compute a value and return normally
    for(var f = 1; x > 1; f *= x, x--) /* empty */ ;
    return f;
}

Flanagan, JavaScript: The Definitive Guide, 5th Edition
TiddlyWiki - a reusable non-linear personal web notebook
tiddlywiki.com/
  • Open your TiddlyWiki file in FireFox (say it's called "mystuff.html")
  • SaveChanges (with SaveBackups switched on) to make sure that you've got a backup of it
  • Without closing that page, right-click on this link, select 'Save target' or 'Save link' and save it as "mystuff.html", replacing your existing file
  • Now go back to the previously opened copy of "mystuff.html" in your browser and SaveChanges again. It will inherit the newly saved code
  • Refresh the page in the browser to verify that the upgrade has worked
  • Workspaces: This Workspace / One More Bug
    www.socialtext.net/one-more-bug/index.cgi?action=w...
    When the workspace receives an email, the subject of the email becomes the title of a page, and the body of the email becomes the body of the page.

    If there is already an existing page with that title, where should the body of the email be added?
    Socialtext Features | Socialtext Enterprise Wiki
    www.socialtext.com/products/features
    Your data is yours - get an HTML or text form export at any time
    Firebug Lite, a JavaScript file you can insert into your pages to simulate the Firebug console in browsers that are not named "Firefox".
    Firebug Documentation
    www.getfirebug.com/docs.html
    How to use Firebug in Internet Explorer, Safari, Opera, and other browsers.
    function _int (s) { return( (isNaN(s) || !isFinite(s)) ? undefined : (s == 0) ? 0 : (s > 0) ? Math.floor(s) : (s < 0) ? Math.ceil( s) : undefined ); };
    dostuff() || die "Ugh"; if(! dostuff() ) throw "Ugh";

    Example 7: Displaying Event Object Properties

    This example uses DOM methods to display all the properties of the window.onload event object and their values in a table. It also shows a useful technique of using a for..in loop to iterate over the properties of an object to get their values.

    The properties of event objects differs greatly between browsers, the W3C DOM 2 Events Specification lists the standard properties, however many browsers have extended these greatly.

    Put the following code into a blank text file and load it into a variety of browsers, you'll be surprised at the different number and names of properties. You might also like to add some elements in the page and call this function from different event handlers.

    getComputedStyle() returns a ComputedCSSStyleDeclaration object, whose individual style properties can be referenced with this object's getPropertyValue() method, as the following example document shows.
    hAccessibility - The Web Standards Project
    www.webstandards.org/2007/04/27/haccessibility/
    I’m not necessarily against using the ISO date format in title attributes, only on an abbr, which in my view should be human-readable to aid accessibility
    hAccessibility - The Web Standards Project
    www.webstandards.org/2007/04/27/haccessibility/
    Since Microformats are not “an attempt to get everyone to change their behavior and rewrite their tools” it is wrong to wait for screen readers to catch up. Instead, the community has a chance to be pragmatic and change.
    hAccessibility - The Web Standards Project
    www.webstandards.org/2007/04/27/haccessibility/
    according to the HTML specification, an ISO date string is not a legitimate, human-consumable, expanded form of that date and time.
    Yahoo! UI Library: Graded Browser Support
    developer.yahoo.com/yui/articles/gbs/index.html#hi...

    The Three Grades of Support

    C-grade

    C-grade is the base level of support, providing core content and functionality. It is sometimes called core support. Delivered via nothing more than semantic HTML, the content and experience is highly accessible, unenhanced by decoration or advanced functionality, and forward and backward compatible. Layers of style and behavior are omitted.

    C-grade browsers are identified on a blacklist. Approximately 3% of our audience receives a C-grade experience.

    Summary: C-grade browsers are identified, incapable, antiquated and rare. QA tests a sampling of C-grade browsers, and bugs are addressed with high priority.

    A-grade

    A-grade support is the highest support level. By taking full advantage of the powerful capabilities of modern web standards, the A-grade experience provides advanced functionality and visual fidelity.

    A-grade browsers are identified on a whitelist. Approximately 96% of our audience enjoys an A-grade experience.

    Summary: A-grade browsers are identified, capable, modern and common. QA tests all A-grade browsers, and bugs are addressed with high priority.

    X-grade

    X-grade provides support for unknown, fringe or rare browsers. Browsers receiving X-grade support are assumed to be capable. (If a browser is shown to be incapable — if it chokes on modern methodologies and its user would be better served without decoration or functionality — then it is considered a C-grade browser.)

    X-grade browsers include all browsers not on the C-grade blacklist or the A-grade whitelist. Approximately 1% of our audience receives the X-grade experience.

    Summary: X-grade browsers are generally unknown, assumed to be capable, modern, and rare or fringe. QA does not test, and bugs are not opened against X-grade browsers.

    The Relationship Between A- and X-grade Support

    A bit more on the relationship between A and X grade browsers: One unexpected instance of X-grade is a newly-released version of an A-grade browser. Since thorough QA testing is an A-grade requirement, a brand-new (and therefore untested) browser does not qualify as an A-grade browser. This example highlights a strength of the Graded Browser Support approach. The only practical difference between A and X-grade browsers is that QA actively tests against A-grade browsers.

    Unlike the C-grade, which receives only HTML, X-grade receives everything that A-grade does. Though a brand-new browser might be characterized initially as a X-grade browser, we give its users every chance to have the same experience as A-grade browsers.

    Quality Assurance (QA) Testing

    Grading the browser ecosystem enables meaningful, targeted, and cost-effective QA testing. As noted, representative C-grade testing and systematic A-grade testing ensures a usable and verified experience for approximately 99% of our audience. A-grade testing must be thorough and complete, while C-grade testing can be accomplished with one or two representative browsers (e.g., Netscape 4.x and Lynx).

    It’s worth reiterating that testing resources do not examine X-grade browsers.

    Yahoo! UI Library: Reset CSS
    developer.yahoo.com/yui/reset/
    Remember to be explicit about your desired presentation, for example adding font-style:bold to strong if you wish to follow the common browser convention that emboldens content within that tag.
    Yahoo! UI Library: Graded Browser Support
    developer.yahoo.com/yui/articles/gbs/index.html#hi...
    in modern web development we must support all browsers. Choosing to exclude a segment of users is inappropriate,
    An artifact with a low surface-to-volume ratio presents a compact vocabulary, with a small number of powerful nouns and verbs. The verbs are the artifact’s operations, and the nouns are its arguments. To keep the surface area low, the designer must strive to find a concise set of nouns and verbs that can be expressively combined.  
    If a programmer needs a thorough understanding of an object’s internal workings, the programmer will often find it easier to write his or her own code.
    Of Bloat and Generic Code - Web Standards Group London May 2007
    icant.co.uk/articles/wsg_london_may07_codebloat/
    minify the heck out of your code when it gets deployed. Remove all whitespace, comments and indentation. Concatenate different CSS and JS includes into single files - there is a great script by Edward Eliot available for that at http://www.ejeliot.com/blog/73. Use CSS sprites to make sure that not too many images are used. This means that your web sites will be smaller and load faster. They also render faster as there are less HTTP requests when the page is loaded and the code is much harder to read and mess around with. Once you minified the code, make sure to add some scary comments.
    Of Bloat and Generic Code - Web Standards Group London May 2007
    icant.co.uk/articles/wsg_london_may07_codebloat/
    Right now I can look for a JavaScript developer if I want to hire someone. In the nearer future when we used different libraries on different projects we will have to find a JavaScript developer who knows all of these. The same thing happened with CMS in the last few years. The question is if we want that.
    Of Bloat and Generic Code - Web Standards Group London May 2007
    icant.co.uk/articles/wsg_london_may07_codebloat/
    In my book, the most important thing a JavaScript library should do is solve the random browser and language problems we have to work around every time we build something with JavaScript.
    Of Bloat and Generic Code - Web Standards Group London May 2007
    icant.co.uk/articles/wsg_london_may07_codebloat/
    What not many people seem to have found out is that the YUI is also available as a hosted version. These files are hosted on a distributed network of servers and are automatically minified and packed. If a user has been on another site with these script includes they will already be cached.
    Of Bloat and Generic Code - Web Standards Group London May 2007
    icant.co.uk/articles/wsg_london_may07_codebloat/
    Good documentation should also not knock out the reader but invite her to play with the system. You can have your JavaDoc style documentation, but in order to make your system maintainable, there should be additional cookbook style documentation. Do not bother with "Hello world" examples, nobody needs them. Explain the system with real implementation examples, not a "perfect world scenario".
    TED | Talks | Blaise Aguera y Arcas: Jaw-dropping Photosynth demo (video)
    www.ted.com/index.php/talks/view/id/129
     the only limit of a display like this one is the number of pixels on your screen... this means the end of on-screen real estate, and we hope this means the end of popups

    this is now taking data from the collective memory of what the earth looks like... it is the long tail to stephen lawler's virtual earth

    this software is creating hyperlinks between images based on the semantic content of the image
    Uberman's sleep schedule || kuro5hin.org
    www.kuro5hin.org/story/2002/4/15/103358/720
    The Uberman's sleep schedule revolves around forcing yourself to rely on six twenty to thirty minute naps spread throughout the day for your daily dose of sleep.
    Polyphasic sleep - Wikipedia, the free encyclopedia
    en.wikipedia.org/wiki/Polyphasic_sleep
    Polyphasic sleep is a term used to describe several alternative sleep patterns intended to reduce sleep time to 2–6 hours daily. This is achieved by spreading out sleep into short naps of around 15–30 minutes throughout the day, and in some variants, a core sleep period of a few hours at night.

    In the Oregon Experiment [Brand 1994][Alexander 1988] Alexander noted:

    Large-lump development is based on the idea of replacement. Piecemeal Growth is based on the idea of repair. … Large-lump development is based on the fallacy that it is possible to build perfect buildings. Piecemeal growth is based on the healthier and more realistic view that mistakes are inevitable. … Unless money is available for repairing these mistakes, every building, once built, is condemned to be, to some extent unworkable. … Piecemeal growth is based on the assumption that adaptation between buildings and their users is necessarily a slow and continuous business which cannot, under any circumstances, be achieve in a single leap.

    Alexander has noted that our mortgage and capital expenditure policies make large sums of money available up front, but do nothing to provide resources for maintenance, improvement, and evolution [Brand 1994][Alexander 1988]. In the software world, we deploy our most skilled, experienced people early in the lifecycle. Later on, maintenance is relegated to junior staff, when resources can be scarce. The so-called maintenance phase is the part of the lifecycle in which the price of the fiction of master planning is really paid.

    incrementally address forces that encourage change and growth. Allow opportunities for growth to be exploited locally, as they occur. Refactor unrelentingly.
    Coding Horror: Skill Disparities in Programming
    www.codinghorror.com/blog/archives/000072.html
    In programming specifically, many studies have shown order of magnitude differences in the quality of the programs written, the sizes of the programs written, and the productivity of the programmers. The original study that showed huge variations in individual programming productivity was conducted in the late 1960s by Sackman, Erikson, and Grant (1968). They studied professional programmers with an average of 7 years' experience and found that the ratio of intitial coding time between the best and worst programmers was about 20:1; the ratio of debugging times over 25:1; of program sizes 5:1; and of program execution speed about 10:1. They found no relationship between a programmer's amount of experience and code quality or productivity. (Code Complete, page 548)
    Code Muse » Blog Archive » Brilliance
    www.code-muse.com/blog/?p=13

    Some years ago I spent a week giving an in-house program design course at a manufacturing company in the mid-west of the United States. On the Friday afternoon it was all over. The DP Manager, who had arranged the course and was paying for it out of his budget, asked me into his office.

    “What do you think?” he asked. He was asking me to tell him my impressions of his operation and his staff. “Pretty good,” I said. “You’ve got some good people there.” Program design courses are hard work; I was very tired; and staff evaluation consultancy is charged extra. Anyway, I knew he really wanted to tell me his own thoughts.

    “What did you think of Fred?” he asked. “We all think Fred’s brilliant.” “He’s very clever,” I said. “He’s not very enthusiastic about methods, but he knows a lot about programming.” “Yes,” said the DP Manager. He swiveled round in his chair to face a huge flowchart stuck to the wall: about five large sheets of line printer paper, maybe two hundred symbols, hundreds of connecting lines. “Fred did that. It’s the build-up of gross pay for our weekly payroll. No one else except Fred understands it.” His voice dropped to a reverent hush. “Fred tells me that he’s not sure he understands it himself.”

    “Terrific,” I mumbled respectfully. I got the picture clearly. Fred as Frankenstein, Fred the brilliant creator of the uncontrollable monster flowchart. That matched my own impression of Fred very well. “But what about Jane?” I said. “I thought Jane was very good. She picked up the program design ideas very fast.”

    “Yes,” said the DP Manager. “Jane came to us with a great reputation. We thought she was going to be as brilliant as Fred. But she hasn’t really proved herself yet. We’ve given her a few problems that we thought were going to be really tough, but when she finished it turned out they weren’t really difficult at all. Most of them turned out pretty simple. She hasn’t really proved herself yet — if you see what I mean?”

    I saw what he meant.

    The Role of Status Seeking in Online Communities: Giving the Gift of Experience
    jcmc.indiana.edu/vol12/issue2/lampel.html

    Why do some individuals invest so much time and effort in posting free advice and information online, while others do so rarely, if at all? Research suggests that a powerful motivation for disproportionate gift giving in offline communities can be traced to status seeking (Harbaugh, 1998). In this article, we argue that status seeking is likewise an important factor in the provision of free advice and information in virtual consumer communities, and that this motivation deserves more attention from researchers who study the rise and evolution of virtual communities.

    Our main argument is two-fold: First, we view status seeking as a social passion that drives participants to invest time and effort in giving the gift of their experience to others without direct benefit to themselves; and second, this social passion is a reliable source of continuing participation, making it more likely that virtual communities will survive and grow. In developing our argument, we draw heavily on research on offline communities that shows that gift giving is closely linked to status seeking (Sherry, 1983). In effect, contrary to early research on virtual communities, we maintain that there is no fundamental break when it comes to basic human motivation between "real" and virtual communities. The manifestation of the same motivation, however, will take a different shape in online communities because it is articulated under different conditions than those of offline communities. Thus status seeking operates in both virtual and offline communities. But whereas in real communities status seeking is associated with professional standing or conspicuous consumption, status seeking in online communities at present works primarily through the written word.

    QuirksBlog: JavaScript and "serious" programmers
    www.quirksmode.org/blog/archives/2005/11/javascrip...
    Suppose you're my boss and order me to write a Java application for you, despite my abysmal ignorance of all things Java. I buy a technical reference book, ask around for the best libraries in town, and with these aids start to create my application. Would you, being my boss, consider this a healthy situation in which I'm guaranteed to deliver a quality product to our clients?
    Waterfall model - Wikipedia, the free encyclopedia
    en.wikipedia.org/wiki/Waterfall_model

    Criticism of the waterfall model

    The waterfall model however is argued by many to be a bad idea in practice, mainly because of their belief that it is impossible to get one phase of a software product's lifecycle "perfected" before moving on to the next phases and learning from them (or, at least, the belief that this is impossible for any non-trivial program).

    Waterfall model - Wikipedia, the free encyclopedia
    en.wikipedia.org/wiki/Waterfall_model
    "a requirements defect that is left undetected until construction or maintenance will cost 50 to 200 times as much to fix as it would have cost to fix at requirements time."
    A design, and the objects that embody it, survive and evolve only if they are used. To be reused, they must attract programmers. To do this, they must make a good first impression. Like peacock feathers, an initial, painless presentation of impressive functionality can enhance an object's appeal. Objects which do this can flourish, and those which cannot, even if they are technically superior in other ways, may not.
    A particularly powerful force in the realm of reuse is Comprehensibility. If an artifact is easy to understand, programmers are more likely to use it than if it is inscrutable. Code that is easy to read is easier to modify. Comprehensibility is determined by the quality of the code itself, as well as any available examples and documentation.
    A code-level artifact must be able to attract programmers in order to survive and flourish. The paper addresses the question of what an object might do to encourage programmers to (re-)use it, as opposed to using some other object, or building new ones.
    In many cases, source-level bug reports will cause misbehaviours to drop out without ever having been attributed to any specific fix.
    Non–source-aware users tend to report only surface symptoms; they take their environment for granted, so they (a) omit critical background data, and (b) seldom include a reliable recipe for reproducing the bug.
    Linus's Law can be rephrased as ``Debugging is parallelizable''. Although debugging requires debuggers to communicate with some coordinating developer, it doesn't require significant coordination between debuggers. Thus it doesn't fall prey to the same quadratic complexity and management costs that make adding developers problematic.

    8. Given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and the fix obvious to someone.

    Or, less formally, ``Given enough eyeballs, all bugs are shallow.'' I dub this: ``Linus's Law''.

    My original formulation was that every problem ``will be transparent to somebody''. Linus demurred that the person who understands and fixes the problem is not necessarily or even usually the person who first characterizes it. ``Somebody finds the problem,'' he says, ``and somebody else understands it. And I'll go on record as saying that finding it is the bigger challenge.'' That correction is important; we'll see how in the next section, when we examine the practice of debugging in more detail. But the key point is that both parts of the process (finding and fixing) tend to happen rapidly.

    In Linus's Law, I think, lies the core difference underlying the cathedral-builder and bazaar styles. In the cathedral-builder view of programming, bugs and development problems are tricky, insidious, deep phenomena. It takes months of scrutiny by a dedicated few to develop confidence that you've winkled them all out. Thus the long release intervals, and the inevitable disappointment when long-awaited releases are not perfect.

    In the bazaar view, on the other hand, you assume that bugs are generally shallow phenomena—or, at least, that they turn shallow pretty quickly when exposed to a thousand eager co-developers pounding on every single new release. Accordingly you release often in order to get more corrections, and as a beneficial side effect you have less to lose if an occasional botch gets out the door.

    Characterizing people as non-linear, first-order components in software development - AC
    alistair.cockburn.us/index.php/Characterizing_peop...
    Being good at communicating and looking around counter inconsistency, leading to the prediction that methodologies can make good use of low-precision artifacts whose gaps are covered by personal communication.
     so an oral tradition is a good thing?
    Characterizing people as non-linear, first-order components in software development - AC
    alistair.cockburn.us/index.php/Characterizing_peop...
    Failing conservatively. It has been fairly well established that people prefer to fail conservatively than to succeed by taking a risk [Pi]. This may explain why waterfall development is still in use after decades of trouble and the advent of spiral, incremental and iterative staging techniques.
    Characterizing people as non-linear, first-order components in software development - AC
    alistair.cockburn.us/index.php/Characterizing_peop...
    Working from examples. Some cognitive psychologists convincingly argue that our deductive mechanisms are built around constructing specific examples of problems [J-L].
    Characterizing people as non-linear, first-order components in software development - AC
    alistair.cockburn.us/index.php/Characterizing_peop...

    Since consistency of action is a common failure mode, we can safely predict that the documentation will not be up to date. In fact, I have not yet interviewed a successful project that had accurate documentation, unless either the code or the documentation was generated automatically. I did, however see a project fail because the developers were told to update all design documentation every time they made a change. Cost of development was just too high, and progress too slow, and the project was soon cancelled.

    I ask maintenance people how they manage to make program updates, in the face of out-of-date documentation. Their answer is that they "just look around", they don't trust the documentation in any case - they just read the code.

    I have come to rely on this "good at looking around" success mode of humans on projects and in methodology design.

    Characterizing people as non-linear, first-order components in software development - AC
    alistair.cockburn.us/index.php/Characterizing_peop...

    When I interview a project, I always ask what caused them to succeed in the end. The single most common answer I receive is, "A few good people stepped in at key moments and did whatever was needed to get the job done." A typical such comment was carefully written up in NASA's "Deorbit flight software lessons learned" [NASA]:

    "Perhaps most important for the long term, during the course of the project, a capable core team for rapid development of GN&C systems evolved. This included finding talented team members; training in and gaining experience with the tools, processes and methodology, and integrating into a cohesive team.
    After working together in the RDL for a year, team members have acquired expertise in methods, tools and domain. A helpful and cooperative atmosphere has encouraged and enabled cross training. A willingness on the part of team members to address any and all project issues has proven invaluable on many occasion..." (my italics added for emphasis)
    ...this team can be a long term asset to the division and to the agency."

    What causes people to do that? One plausible answer is, "good citizenship".

    Perhaps we can increase the rate of project success simply by increasing the "sense of community and good citizenship" on the team. I actually don't propose that as a top recommendation, because I find that the sense of good citizenship is already generally high, and improper management is already taking too much advantage of it (see, for example, Death March [Yo]).

    However, the idea does reveal a rarely mentioned element of methodology design:

    "Community and citizenship"

    should be among a project's central activities and measures, at least on a par with "code review and testing".

    Characterizing people as non-linear, first-order components in software development - AC
    alistair.cockburn.us/index.php/Characterizing_peop...
  • People work well from examples (a topic for more study, however, see [J-L]).
  • People prefer to fail conservatively than to risk succeeding differently [Pi]; prefer to invent than to research, can only keep a small amount in their heads, and do make mistakes, and find it hard to change their habits.
  • Characterizing people as non-linear, first-order components in software development - AC
    alistair.cockburn.us/index.php/Characterizing_peop...
    we can't say what we are seeing until we have names for what we are seeing. Evidently, our current vocabulary is inadequate.
    Characterizing people as non-linear, first-order components in software development - AC
    alistair.cockburn.us/index.php/Characterizing_peop...
    The design teams had the privelidge of ignoring any tool or technique they didn't like. All they had to say to their boss was, "It slows me down - I won't make the schedule if I use it," and their boss would let them ignore it. At the time I did not think this was significant to write down, but I did note it as a methodology "design constraint".
    Characterizing people as non-linear, first-order components in software development - AC
    alistair.cockburn.us/index.php/Characterizing_peop...
  • Problem 1. The people on the projects were not interested in learning our system.
  • Problem 2. They were successfully able to ignore us, and were still delivering software, anyway.
  •  qft -- see also Big Ball of Mud
    Characterizing people as non-linear, first-order components in software development - AC
    alistair.cockburn.us/index.php/Characterizing_peop...
    the software development community has largely ignored the characteristics of people as a topic of study. This is a significant oversight, akin to ignoring iron in walls and wondering why radio experiments are not giving the expected results.
     this is the kind of witticism that makes a good forum signature
    ...the tears that you are crying now
    Are just your answered prayers
    The ladders of life that we scale merrily
    Move mysteriously around
    So that when you think you're climbing up, man
    In fact you're climbing down

    --Nick Cave, "Oh My Lord"
    This verse seems relevant to Web development for some reason...
    // Apply the default Object.toString( ) method to an object that // overrides it with its own version of the method. Note no arguments.

     Object.prototype.toString.apply(o);

    // Invoke the Math.max( ) method with apply to find the largest // element in an array. Note that first argument doesn't matter // in this case.

    var data = [1,2,3,4,5,6,7,8]; Math.max.apply(null, data);
     Examples of using apply(), because it comes up in
    http://video.yahoo.com/video/play?vid=cccd4aa02a3993ab06e56af731346f78.1027832
    and I wasn't sure what it did! 

     The second example is rad - a brief, fast(?) way to find the largets element in an array of numbers.
    Don't clog the tubes

    SEOmoz | 5 HTML elements you probably never use (but perhaps should)
    www.seomoz.org/blog/5-html-elements-you-probably-n...
    optgroup, fieldset, legend
    When you build a prototype, there is always the risk that someone will say "that's good enough, ship it". One way to minimize the risk of a prototype being put into production is to write the prototype in using a language or tool that you couldn't possible use for a production version of your product.
    Big Ball of Mud
    www.laputan.org/mud/
    Cost: Writing-off a system can be traumatic, both to those who have worked on it, and to those who have paid for it. Software is often treated as an asset by accountants, and can be an expensive asset at that. Rewriting a system, of course, does not discard its conceptual design, or its staff’s experience. If it is truly the case that the value of these assets is in the design experience they embody, then accounting practices must recognize this.
    Big Ball of Mud
    www.laputan.org/mud/
    At first glance, a BIG BALL OF MUD can inspire terror and despair in the hearts of those who would try to tame it. The first step on the road to architectural integrity can be to identify the disordered parts of the system, and isolate them from the rest of it. Once the problem areas are identified and hemmed in, they can be gentrified using a divide and conquer strategy.
    Big Ball of Mud
    www.laputan.org/mud/
    Children often learn that a single heap in the closet is better than a scattered mess in the middle of the floor.
    Big Ball of Mud
    www.laputan.org/mud/

    One always has, at every stage, in the process, a working system. I find that teams can grow much more complex entities in four months than they can build.

    -- From "No Silver Bullet" [Brooks 1995]

    Microsoft mandates that a DAILY BUILD of each product be performed at the end of each working day. Nortel adheres to the slightly less demanding requirement that a working build be generated at the end of each week [Brooks 1995][Cusumano & Shelby 1995]. Indeed, this approach, and keeping the last working version around, are nearly universal practices among successful maintenance programmers.

    Another vital factor in ensuring a system's continued vitality is a commitment to rigorous testing [Marick 1995][Bach 1994]. It's hard to keep a system working if you don't have a way of making sure it works. Testing is one of pillars of Extreme Programming. XP practices call for the development of unit tests before a single line of code is written.

    v v v

    Always beginning with a working system helps to encourage PIECEMEAL GROWTH. Refactoring is the primary means by which programmers maintain order from inside the systems in which they are working. The goal of refactoring is to leave a system working as well after a refactoring as it was before the refactoring. Aggressive unit and integration testing can help to guarantee that this goal is met.

    Big Ball of Mud
    www.laputan.org/mud/

    In the Oregon Experiment [Brand 1994][Alexander 1988] Alexander noted:

    Large-lump development is based on the idea of replacement. Piecemeal Growth is based on the idea of repair. … Large-lump development is based on the fallacy that it is possible to build perfect buildings. Piecemeal growth is based on the healthier and more realistic view that mistakes are inevitable. … Unless money is available for repairing these mistakes, every building, once built, is condemned to be, to some extent unworkable. … Piecemeal growth is based on the assumption that adaptation between buildings and their users is necessarily a slow and continuous business which cannot, under any circumstances, be achieve in a single leap.

    Alexander has noted that our mortgage and capital expenditure policies make large sums of money available up front, but do nothing to provide resources for maintenance, improvement, and evolution [Brand 1994][Alexander 1988]. In the software world, we deploy our most skilled, experienced people early in the lifecycle. Later on, maintenance is relegated to junior staff, when resources can be scarce. The so-called maintenance phase is the part of the lifecycle in which the price of the fiction of master planning is really paid. It is maintenance programmers who are called upon to bear the burden of coping with the ever widening divergence between fixed designs and a continuously changing world. If the hypothesis that architectural insight emerges late in the lifecycle is correct, then this practice should be reconsidered.

    Brand went on to observe Maintenance is learning. He distinguishes three levels of learning in the context of systems. This first is habit, where a system dutifully serves its function within the parameters for which it was designed. The second level comes into play when the system must adapt to change. Here, it usually must be modified, and its capacity to sustain such modification determines it’s degree of adaptability. The third level is the most interesting: learning to learn. With buildings, adding a raised floor is an example. Having had to sustain a major upheaval, the system adapts so that subsequent adaptations will be much less painful.

    PIECEMEAL GROWTH can be undertaken in an opportunistic fashion, starting with the existing, living, breathing system, and working outward, a step at a time, in such a way as to not undermine the system’s viability. You enhance the program as you use it. Broad advances on all fronts are avoided. Instead, change is broken down into small, manageable chunks.

    One of the most striking things about PIECEMEAL GROWTH is the role played by Feedback. Herbert Simon [Simon 1969] has observed that few of the adaptive systems that have been forged by evolution or shaped by man depend on prediction as their main means of coping with the future. He notes that two complementary mechanisms, homeostasis, and retrospective feedback, are often far more effective. Homeostasis insulates the system from short-range fluctuations in its environment, while feedback mechanisms respond to long-term discrepancies between a system's actual and desired behavior, and adjust it accordingly. Alexander [Alexander 1964] has written extensively of the roles that homeostasis and feedback play in adaptation as well.

    If you can adapt quickly to change, predicting it becomes far less crucial. Hindsight, as Brand observes [Brand 1994] is better than foresight. Such rapid adaptation is the basis of one of the mantras of Extreme Programming [Beck 2000]: You're not going to need it.

    Big Ball of Mud
    www.laputan.org/mud/
    When designers are faced with a choice between building something elegant from the ground up, or undermining the architecture of the existing system to quickly address a problem, architecture usually loses. Indeed, this is a natural phase in a system’s evolution [Foote & Opdyke 1995]. This might be thought of as messy kitchen phase, during which pieces of the system are scattered across the counter, awaiting an eventual cleanup. The danger is that the clean up is never done. With real kitchens, the board of health will eventually intervene. With software, alas, there is seldom any corresponding agency to police such squalor.
    Big Ball of Mud
    www.laputan.org/mud/
    incrementally address forces that encourage change and growth. Allow opportunities for growth to be exploited locally, as they occur. Refactor unrelentingly.
    Big Ball of Mud
    www.laputan.org/mud/

    an examination of software development costs showed that problems were many times more expensive to fix during maintenance than during design. Surely it was best to mobilize resources and talent up-front, so as to avoid maintenance expenses down the road. It's surely wiser to route the plumbing correctly now, before the walls are up, than to tear holes in them later. Measure twice, cut once.

    One of the reasons that the waterfall approach was able to flourish a generation ago was that computers and business requirements changed at a more leisurely pace. Hardware was very expensive, often dwarfing the salaries of the programmers hired to tend it. User interfaces were primitive by today's standards. You could have any user interface you wanted, as long as it was an alphanumeric "green screen". Another reason for the popularity of the waterfall approach was that it exhibited a comfortable similarity to practices in more mature engineering and manufacturing disciplines.

    Today's designers are confronted with a broad onslaught of changing requirements. It arises in part from the rapid growth of technology itself, and partially from rapid changes in the business climate (some of which is driven by technology). Customers are used to more sophisticated software these days, and demand more choice and flexibility. Products that were once built from the ground up by in-house programmers must now be integrated with third-party code and applications. User interfaces are complex, both externally and internally. Indeed, we often dedicate an entire tier of our system to their care and feeding. Change threatens to outpace our ability to cope with it.

    Big Ball of Mud
    www.laputan.org/mud/
    When you build a prototype, there is always the risk that someone will say "that's good enough, ship it". One way to minimize the risk of a prototype being put into production is to write the prototype in using a language or tool that you couldn't possible use for a production version of your product.
    Big Ball of Mud
    www.laputan.org/mud/
    if no one ever looks at code, everyone is free to think they are better than average at producing it. Programmers will, instead, respond to those relatively perverse incentives that do exist. Line of code metrics, design documents, and other indirect measurements of progress and quality can become central concerns.
    Big Ball of Mud
    www.laputan.org/mud/

    The incentives that drive the evolution of such systems can, at times, operate perversely. Just as it is easier to be verbose than concise, it is easier to build complex systems than it is to build simple ones. Skilled programmers may be able to create complexity more quickly than their peers, and more quickly than they can document and explain it. Like an army outrunning its logistics train, complexity increases until it reaches the point where such programmers can no longer reliably cope with it.

    This is akin to a phenonmenon dubbed the PeterPrinciple of Programming by authors on the Wiki-Wiki web [Cunninghan 1999a]. Complexity increases rapidly until the it reaches a level of complexity just beyond that with which programmers can comfortably cope. At this point, complexity and our abilities to contain it reach an uneasy equilibrium. The blitzkrieg bogs down into a siege. We built the most complicated system that can possible work [Cunningham 1999b].

    Big Ball of Mud
    www.laputan.org/mud/
    When it comes to software architecture, form follows function. Here we mean "follows" not in the traditional sense of dictating function. Instead, we mean that the distinct identities of the system’s architectural elements often don’t start to emerge until after the code is working.
    Big Ball of Mud
    www.laputan.org/mud/

    Variable and function names might be uninformative, or even misleading. Functions themselves may make extensive use of global variables, as well as long lists of poorly defined parameters. The function themselves are lengthy and convoluted, and perform several unrelated tasks. Code is duplicated. The flow of control is hard to understand, and difficult to follow. The programmer’s intent is next to impossible to discern. The code is simply unreadable, and borders on indecipherable. The code exhibits the unmistakable signs of patch after patch at the hands of multiple maintainers, each of whom barely understood the consequences of what he or she was doing. Did we mention documentation? What documentation?

    BIG BALL OF MUD might be thought of as an anti-pattern, since our intention is to show how passivity in the face of forces that undermine architecture can lead to a quagmire. However, its undeniable popularity leads to the inexorable conclusion that it is a pattern in its own right. It is certainly a pervasive, recurring solution to the problem of producing a working system in the context of software development. It would seem to be the path of least resistance when one confronts the sorts of forces discussed above. Only by understanding the logic of its appeal can we channel or counteract the forces that lead to a BIG BALL OF MUD.

    One thing that isn’t the answer is rigid, totalitarian, top-down design. Some analysts, designers, and architects have an exaggerated sense of their ability to get things right up-front, before moving into implementation. This approach leads to inefficient resources utilization, analysis paralysis, and design straightjackets and cul-de-sacs.

    Big Ball of Mud
    www.laputan.org/mud/

    As a system nears completion, its actual users may begin to work with it for the first time. This experience may inspire changes to data formats and the user interface that undermine architectural decisions that had been thought to be settled. Also, as Brooks [Brooks 1995] has noted, because software is so flexible, it is often asked to bear the burden of architectural compromises late in the development cycle of hardware/software deliverables precisely because of its flexibility.

    This phenomenon is not unique to software. Stewart Brand [Brand 1994] has observed that the period just prior to a building’s initial occupancy can be a stressful period for both architects and their clients. The money is running out, and the finishing touches are being put on just those parts of the space that will interact the most with its occupants. During this period, it can become evident that certain wish-list items are not going to make it, and that exotic experiments are not going to work. Compromise becomes the "order of the day".

    Big Ball of Mud
    www.laputan.org/mud/
    Frequently, the organization of the system reflects the sprawl and history of the organization that built it (as per CONWAY’S LAW [Coplien 1995]) and the compromises that were made along the way.
    Big Ball of Mud
    www.laputan.org/mud/
    Some of these patterns might appear at first to be antipatterns [Brown et al. 1998] or straw men, but they are not, at least in the customary sense. Instead, they seek to examine the gap between what we preach and what we practice.
    Carsonified! » Blog Archive » An easy tip for managing your team
    www.carsonified.com/biz-tips/tips-for-managing-sma...

    SCRUM over the internet. What a great idea.

     from the comments
    Carsonified! » Blog Archive » An easy tip for managing your team
    www.carsonified.com/biz-tips/tips-for-managing-sma...
    The guys from Last.fm mentioned a similar system they use at the last FOWA, based around IRC. What was really cool about theirs is that things like subversion updates are entered into the chat.
     from the comments
    Carsonified! » Blog Archive » An easy tip for managing your team
    www.carsonified.com/biz-tips/tips-for-managing-sma...
    We have weekly Tuesday meetings (for the Bath office) at a coffee shop and by doing this weekly check-in on Mondays, we already have a good idea of what everyone’s up to for the week, when we start that meeting.
     so you're saying, have daily scrum over Campfire, and meet face to face once a week, outside the office?  Sounds great!
    From the LGPL, which is the license for the GreyBox lightbox implementation

     " Most GNU software, including some libraries, is covered by the
    ordinary GNU General Public License.  This license, the GNU Lesser
    General Public License, applies to certain designated libraries, and
    is quite different from the ordinary General Public License.  We use
    this license for certain libraries in order to permit linking those
    libraries into non-free programs."

      "When a program is linked with a library, whether statically or using
    a shared library, the combination of the two is legally speaking a
    combined work, a derivative of the original library.  The ordinary
    General Public License therefore permits such linking only if the
    entire combination fits its criteria of freedom.  The Lesser General
    Public License permits more lax criteria for linking other code with
    the library."
    I can get wget to work when I enter a url like: wget http://username:password@www.mysite.co.uk/admin/
     this is how to get wget to enter a username and password.  The manpage says something else O.o
    HTTP Options - GNU Wget 1.10 Manual
    www.gnu.org/software/wget/manual/html_node/HTTP-Op...
    --load-cookies file
    Load cookies from file before the first HTTP retrieval. file is a textual file in the format originally used by Netscape's cookies.txt file.

    You will typically use this option when mirroring sites that require that you be logged in to access some or all of their content. The login process typically works by the web server issuing an http cookie upon receiving and verifying your credentials. The cookie is then resent by the browser when accessing that part of the site, and so proves your identity.

    Mirroring such a site requires Wget to send the same cookies your browser sends when communicating with the site. This is achieved by --load-cookies—simply point Wget to the location of the cookies.txt file, and it will send the same cookies your browser would send in the same situation. Different browsers keep textual cookie files in different locations

    JavaScript Library Showdown
    The rise of web applications is proportionally linked to the rise of Javascript libraries enabling developers to deliver more punch with less time and code. In this showdown, we'll face-off the four most popular Javascript libraries and toolkits and unearth some sound strategies to help you choose the most appropriate weapon for your development environment. We'll also dispel some of the most common myths and assumptions made by developers when working with libraries and toolkits.
    Ryan Campbell


    browsers / web apps · hacks / programming
    Why XSLT is Sexy
    With two excellent libraries released in the last year from Google (AJAXSLT) and Manos Batsis (Sarissa), client-side XSLT in Javascript is becoming a more usable option for web developers. By providing device independance and platform independance, XSLT is perfectly suited for working with web services generating XML and XHTML. By being able to leverage the same technique on the client and server, developers can really get more bang for their buck. Panel moderators will show you how easy it is to do XSLT in Javascript, or on the server, as well as when to and when not to.
    Lindsey Simon


    hacks / programming · web design / graphics
    JavaScript World Title Fight
    In a recreation of the popular panel from @Media 2006, some of JavaScript's leading thinkers and practitioners will debate over the future of the language and its renewed place at the heart of the Web. Topics for discussion include the emergence of JavaScript frameworks such as Prototype and Dojo, auto-generative tools such as Google Web Toolkit, the advantages and flaws of AJAX, and the language's future as JavaScript 2.
    Cameron Adams

    hacks / programming · how to
    Rapid JavaScript Development
    JavaScript has seen a resurgence, with libraries like Prototype, Dojo, YUI and others helping to lead the way. Rapid JavaScript Development delves into some of the techniques these libraries use and how you can use these techniques in practical ways in your own development. The focus will be on creating maintainable and extensible code and cover techniques such as anonymous functions, closures, objects, iterators, AJAX and JSON.


    web design / graphics · CSS / standards
    Uniting the Holy Trinity of Web Design
    Much talking has been done about the three different layers of front-end development: Data (HTML), Style (CSS), and Behaviour (JavaScript). But little has been mentioned about the integration of all three. This panel will explore how they interact with one another, the best strategies for enhancing collaboration between the different areas, and the unique results that can be achieved when they are combined in a truly synergistic manner.
    Cameron Adams

    browsers / web apps · hacks / programming
    Ruining the User Experience: When JavaScript and Ajax Go Bad
    With the exploding popularity of DOM Scripting, Ajax and JavaScript in general, it's important to know what to do -- and what not to do -- when dealing with these technologies. This session will walk you through several real-world examples, pointing out common mistakes that hinder usability, accessibility, and search while teaching you ways to avoid them altogether, either programmatically or simply by altering the way you think about JavaScript-based interactivity.
    Aaron Gustafson

    hacks / programming · web 2.0
    The Future of JavaScript
    We're starting to understand DOM Scripting and Ajax, but what's next for JavaScript? Numerous companies are starting to use JavaScript as a true programing language, taking it beyond the browser and into Dashboard Widgets, IM clients, web servers, and even Photoshop. Several of the field's luminaries discuss what the future holds for JavaScript, examining its role both in and out of the browser.
    Aaron Gustafson

    education / sociological · hacks / programming
    Javascript: The Big Picture
    Now that JavaScript is in fashion again, we're facing a few non-technical issues that may be more important than the technical ones. There are two ways of writing JavaScript: the client side and the server side way. They focus on different things: application development vs. CSS/accessibility, respectively. Is one of the two clearly "right", or is there place for both? What's going to happen once the Ajax hype folds?




     
    Avoid using underscores in class and id names at all costs! Also avoid starting with numbers.

    Wasn't object-oriented software supposed to take the labor out of programming?

    Yes, that was the promise, but it didn't exactly pan out. Unless it's been designed for reuse, you're going to have a really hard time taking software off the shelf. Research shows that, in order for software to be designed for reuse, it usually needs to be deployed in three different contexts.

    Inheritance has made things more confusing, too. With inheritance, you write a class, and you write its methods, using traditional terminology; and then if you make a sub-class, you inherit the methods and maybe you augment them in various ways. But deep inheritance trees could cause confusion because of the amount of inheritance that you have to track and understand. So, you actually didn't get much benefit. Basically, because there's so much work involved in making things reusable, it doesn't usually get done. But the Java language is pretty successful, and folks write lots of apps in it.

    With the Feyerabend Project, we're aiming at development efficiency, and thinking in terms of computers helping us grow the code rather than people typing it in, or taking it off the shelf. We have to open our minds to what's really happening, not what we hope is happening.

    In the 1990s, the Internet changed the scale of things dramatically. By the middle of the 1990s, Smalltalk had made a lot of inroads in the business world, and Java technology (although no one at Sun thought this way) followed the Smalltalk path, and then displaced it. I mean, Smalltalk was a server-side technology -- though the Smalltalk companies didn't like that -- and Sun initially thought of Java technology as client-side. Now Java software has its best successes on the server-side. And the customers are the same. The Java language rode on the coattails of C++ also, and didn't really replace C++, but certainly has taken a big chunk of its mental real estate.

    And now, since we've been doing objects for about ten years with pretty good success, we don't look at functional languages, or logic-based languages, or declarative languages -- we don't look at lots of different things that we used to.

    I went to Amazon and searched for all the books containing "learn" or "teach yourself," and then "hours" or "days" in the title. Such as, "Teach Yourself X in 21 Days." There are hundreds of them and almost all of them are computer books. "Teach yourself object-oriented programming pronto," and so forth. Writing software is an art, and it takes about ten years to really get good at it. But there's an underlying attitude that programming and software development are easy. We have this attitude that programming is auxiliary, when it's a very central,

    I think developers already know but are a little afraid to admit that writing software is a creative activity that requires a lot of interaction with the people who are going to use it. Writing software is a highly iterative, dynamic process requiring user feedback. Again, it's like writing poetry in that you write some of it, and then you respond to it, which triggers more creativity, and you keep going. Then, you show it to someone whose opinion you respect, and you see it differently.

    Some of the more agile methodologies like Extreme Programming use this process. Extreme programmers discuss with end users what to build first. Then they spend a couple of weeks building, and show it to the end user. The end user uses it for a while, and then might say, "Oh, now I understand." Customers might not have a good understanding of what needs to be done since they're not programmers. Something they might not even have imagined might be doable.

    Minding the big ball of mud

    Your beam consists of every electronic document you have ever created or received, in chronological order. Every e-mail and voice mail and MP3 and project report, snapshot, video, shopping list
    Today's Web is indeed weblike, but it's no beautiful design of the sort talented spiders weave; it is a tangled cobweb of the type you find in broken-down shacks and haunted houses.
    When you build a prototype, there is always the risk that someone will say "that's good enough, ship it". One way to minimize the risk of a prototype being put into production is to write the prototype in using a language or tool that you couldn't possible use for a production version of your product.
    ...it's addictive, once you have a reputation as a problem solver and originator, you can't stop seeking out ever more diverse solutions and pulling the rabbits from the hats.  ---Phillhip Hunt of Studio aka, in Pictoplasma 2, p. 7
    Mr. Lincoln's T-Mails | What Abraham Lincoln Taught Me about Email
    www.mrlincolnstmails.com/emails.php
    Abraham Lincoln's habit was to walk into the War Department telegraph office, open the drawer containing copies of all the telegrams received, and read them all, regardless of to whom they were addressed. Through this procedure Lincoln had a keyhole into the thinking of his generals and activities in the field. The "cc" and "Reply All" function of email provides a similar opportunity for us to stay informed.
    The Waste Land by T.S. Eliot as hypertext
    eliotswasteland.tripod.com/
    Ecc 12:6
    Or ever the silver cord be loosed, or the golden bowl be broken, or the pitcher be broken at the fountain, or the wheel broken at the cistern.
    An Interface Designer translates business rules for a Web site into functional Web site architecture.  -- Anonymous
     
    How to use FireBug with the JavaScript shell?
    I can write to the console directly by typing a console call on the command line.
    But when I am replacing functions in an existing script, using the shell, I get the error "console is not a function".  window.parent.console produces a similar error.
    Atlanta opera singer turned crime blogger Steve Huff
    MyDeathSpace
    The Volokh Conspiracy - EPA Employees Embrace Action on Climate:
    volokh.com/posts/1164927388.shtml
    the War Before Civilization by Lawrence Keeley
    Can It Be Done -- Photo Subscriptions With iTunes?

    Can I subscribe to a photostream with my iPod?
    That is, can I subscribe to bluejake's RSS feed at http://streetsy.com? 
    End of 2006

    My amazon merchant ID (or whatever its called) is "httpwwwonemoc-20"
    Add this to the url of any Amazon order, and I get a kickback ^.^ 
    The behavior of any bureaucratic organization can best be understood by assuming that it is controlled by a secret cabal of its enemies.
    Robert Conquest's Second Law of Politics
     
    CSS and HTML

    A List Apart: Articles: Sliding Doors of CSS
    alistapart.com/articles/slidingdoors

    "We set the anchors to block-level elements so we can control all aspects without worrying about the inline box"

    What is the "inline box" and why would I worry about it in the first place???

    TheFangMonster's bookmarks tagged with "roundedcorners" on del.icio.us
    del.icio.us/thefangmonster/roundedcorners
    "A basic principle of data processing teaches the folly of trying to maintain independent files in synchonism"  -- Fred Brooks


    TiddlyWiki - a reusable non-linear personal web notebook
    www.tiddlywiki.com/#InlineHTML
     No need to close HTML tags in TiddlyWiki.

    I just realized that there's no reason to terminate HTML tags in Tiddlywiki (when doing inline html) because the tags will automatically be terminated by the JS engine when it parses the DOM.  I verified this with  View Rendered Source Chart.

    Less typing ftw!

     I just noticed that in the JavaScript console of Firebug, it is possible to select Options > Larger Command Line.
    This gives a much larger js evaluation window.  Multiple lines are allowed.  So it replaces completely Jesse Ruderman's javascript shell bookmarklet.
    The ability to enter multiple lines is the only thing that (I thought!) was missing from Firebug.
    Websites as graphs - an HTML DOM Visualizer Applet
    www.aharef.info/static/htmlgraph/?url=http://colle...
    Web Sites as Graphs is a service that displays an HTML document as a tree of connected tags.  The type of each tag is indicated by color, but the graph does not contain any information about the human-readable content of the document.  

    This makes for an excellent visualization of document structure, abstracted away from considerations like content and graphic design.

    This link points to a page on the College Board site.  Other interesting sites to look at and compare include Google and Amazon.
    List of Internet slang phrases - Wikipedia, the free encyclopedia
    en.wikipedia.org/wiki/List_of_Internet_slang
    3 letter internet slangs with humorous meaning
    afk
    gtg
    kos
    lol
    pwn
    wtf
    Coding Horror: Separating Programming Sheep from Non-Programming Goats
    www.codinghorror.com/blog/archives/000635.html
    The test was administered twice; once at the beginning, before any instruction at all, and again after three weeks of class. The striking thing is that there was virtually no movement at all between the groups from the first to second test. Either you had a consistent model in your mind immediately upon first exposure to assignment, the first hurdle in programming-- or else you never developed one!
    Why Johnny can't program
    www.bricklin.com/wontprogram.htm
    What makes one system easier or harder than another?
    In Don Norman's wonderful book "The Psychology of Everyday Things" (now called "The Design of Everyday Things" in paperback) he provides these "principles of good design" (at the end of Chapter 2):

    Visibility. By looking, the user can tell the state of the device and the alternatives for action.
    A good conceptual model. The designer provides a good conceptual model for the user, with consistency in the presentation of operations and results and a coherent, consistent system image.
    Good mappings. It is possible to determine the relationships between actions and results, between controls and their effects, and between the system state and what is visible.
    Feedback. The user receives full and continuous feedback about the results of actions.

    A traditional, "typed statement" programming environment (traditional "procedural" or "declarative") falls down on all of these. It is often very difficult to determine the relationships between operations and results. The feedback is not continuous -- because of syntax constraints there are many times that a program being modified is not in a state where you can see the results.
    Good and Bad Procrastination
    www.paulgraham.com/procrastination.html
    There may be types of work that can only be done in long, uninterrupted stretches, when inspiration hits, rather than dutifully in scheduled little slices. Empirically it seems to be so. When I think of the people I know who've done great things, I don't imagine them dutifully crossing items off to-do lists. I imagine them sneaking off to work on some new idea.

    Conversely, forcing someone to perform errands synchronously is bound to limit their productivity. The cost of an interruption is not just the time it takes, but that it breaks the time on either side in half. You probably only have to interrupt someone a couple times a day before they're unable to work on hard problems at all.

    I've wondered a lot about why startups are most productive at the very beginning, when they're just a couple guys in an apartment. The main reason may be that there's no one to interrupt them yet. In theory it's good when the founders finally get enough money to hire people to do some of the work for them. But it may be better to be overworked than interrupted. Once you dilute a startup with ordinary office workers—with type-B procrastinators—the whole company starts to resonate at their frequency. They're interrupt-driven, and soon you are too.
    The content on this page is provided by a Google Notebook user, and Google assumes no responsibility for this content.