This Wiki has been created by RyanGerry and uses [[TiddlyWiki|]]. It was originally started as a file that I only used on my local machine. However, I decided that there is no good reason to keep it private so now it is on the web. This is not a very cooperative wiki since only I can edit it. But since I mostly use it as a personal notebook I am willing to sacrifice collaboration for the simplicity of [[TiddlyWiki|]] which is all one file.\n\nI am currently using the Kubric theme created by Clint Checketts which is availabe from .\n\nIf you would like to be collaborative I can be reached at the email address at the result of this Perl one linter:\n\n{{{ perl -e'print join("", reverse qw(com . gmail @ gerryster)), "\sn"' }}}\n\n''svn information''\n$Id: index.html 101 2010-12-02 14:33:21Z ryan $
!Tuesday 11 AM Keynote - Nick Brien - Universal McCAn\n!!Intro by one of the AdTech chairs\n* "Unbundling Has Been a Failure"\n* First AdTech was in 1996.\n* Radiohead experiment - offered album for free. 38% payed about $6 and the rest just downloaded it.\n** Total sales: Larger than compbined sales of previous two albums durgin the same time period\n!!Main Keynote\n* Talked about the convergence of media platforms (tv, phone, computer as one)\n* "Media is the ultimate social lubricant."\n* Agencies were in the business of persuasion. Now we are in the world of influance. But the speaker suggested you need to use both.\n\n!Global Perspectives on the Digital Revolution\n* The future is already here it is just unevenly distributed.\n* Cell phone use is expected to be 4 billion in 2010.\n\nAnd, I won't be able to take many more notes than this as adTech is not very laptop freindly.
Paul Fenwick\n* Talked about a 2000 year old Greek device used to calculate the revolutions of the sun and moon\n* There was an idea which software could be made perfect \n* Therac-25 was a cancer machine: was made without hardware interlocks (because the software was perfect) - picked the wrong mode six times in three years\n* Code = Bugs\n* "It's possible to make mistakes so large they invalidate your entire worth as a human being" - Adam Kennedy\n* What if we had a metric to evaluate failure?\n** Did some silly math which multiplied the GDP by average life span and got to 3.1 million USD. Defined that number as the lifetime failure.\n* Gave a switching example which cost AT&T millions of dollars\n* Ariane 5 - European space agency in 1996 - measured distance in a 64 bit floating point number which was cast to a 16 bit integer. \n** Turned off all of the exception handling in this code. \n** They had a test but did not test it before the launch\n** $360 MM cost - almost 12,000 life years\n* Auckland (New Zeland) blackout of 1996\n** Left without power for five weeks.\n** Running 150 MW of load over 110 MW of cables\n** A cable failed and they had bad press so they didn't tell anyone about it\n** Management willpower vs. Physics\n** Cost: 150 MM to the power company; cost to Auckland business: unknown\n* Curse of the sysadmin - hard to get people to listen to you\n** but they are doom sayers\n* Mars Climate Orbiter: 1998\n** Imperial vs. Metric issue. pound force vs. newtons\n** Testing budget was cut at the end of the project\n* Mars Lander\n** Landing thrusters stopped working\n** Landing gear moving = landing\n** total cost for all projects: 8,300 years\n* came up with deep space two: all it had to do was to hit mars\n** but it missed it's launch date and was stored for a year\n** hit mars but no data came back because the batteries were dead\n* 2003 North East blackouts\n** 50MM people were affected\n** A power company, First Energy was responsible\n** An alarm system failed silently for 27 minutes\n** the hot spare fialed after 13 mins\n** One of the huge lines failed but that was noticed because the alarms were dead\n** Power was rerouted but then one of those cables failed\n** There was an oversight board: MISO\n*** their software had an error before the previous problems happened\n** MISO's software was too inflexable and First Energy's software had a race condition\n** About 6000 lifetimes of cost\n!Lessons\n* Test your code\n** and before launch\n* Test your spec\n* Listen to your sysadmins\n* test for race conditions and think really really hard about them
!Day 1 Basic\n* external integration is via command line\n* load ballencing\n* runs on Unix and Windows\n* Version 6 uses JDBC drivers to connect to pretty much any DB\n* There is a command line utility called {{{awrun}}} which can be used to edit objects directly. There is also an Oracle stored procedure called {{{awrun}}} with a similar interface.\n* There is a database browser utility inside the application. There are also views which give better names to the columns within the real tables.\n* The {{{awprint}}} command line utility inserts a record into the AppWorx database so it is possible to tell appworks about files the program creates.\n* View menu\n** see who is connected\n** send a broadcast message\n* restarting AppWorx will not kill any jobs\n* Lower number priorities have preference.\n* The acronym seen in tables, SO, stands for SQL Opera which was the original name of the product.\n* Staging Jobs allow you to change the parameters on a job just for one iteration.\n* There is a prompt type called modules where you can define the contents of a SQL query to fill in a drop down.\n\n!Day 2 - Advanced\n* {{{awrun}}} is a command line utility which can start ad hoc jobs\n** There is a {{{-iic}}} option where you can insert jobs into a chain.\n*** Example, insert a module into an existing chain (id of 8006.00). There is a $chain_id environment variable. Insert the module (job) TEST_MODULE and call it B in the chain. Make it dependent on module A with a success criteria (S).\n** {{{aw4.awrun}}} is the Oracle stored procedure.\n{{{$ awrun TEST_MODULE -v B -iic 8006.00 -pr "&/A = S"}}}\n* Starting AppWorx. Java Web start can create a shortcut on your desktop to the cached client. Run this command {{{javaws -viewer}}} to see all of the cached applications. You can then right click on AppWorx and have a shortcut created on the desktop.\n* Scripts\n** There are PREFIX commands which are essential pre run hooks at different levels of granularity. Similarly there are COMPLETION and TROUBLE hooks. These are not used as much any more as there are more features to AppWorx.\n** The SYSOUT script can be used to redirect output to user defined files. SYSOUT happens before PREFIX.\n* These need to be located in the $AW_HOME/exec directory.\n* There is a {{{show_status}}} environment variable where you can set statuses yourself.\n* There is a shell which is called {{{appworx}}}.\n** Can't create objects but you can view statuses\n** can be run from the master or a remote client\n** {{{jq}}} shows you the job queue, {{{agents}}}, and {{{queue}}} are other obviously named commands.\n** {{{setvar}}} and {{{getvar}}} are commands which manipulate substitution variables\n* Tables\n** The SO_JOB_HISTORY table contains the history information.\n** {{{AV_JOB_HISTORY}}} is the union between the queue and history table.\n** There are SO_JOB_ACTIVITY.SO_REF1-9 columns in the queue table which can be useful for storing custom values such as the number of records in a job.\n*** Example of setting these: {{{awexe EPD_SO_REF1 var_value=123 so_job_id=x}}}\n* ''Substitution variables are global''\n* Exporing/Importing\n** Saves flat file to $AW_HOME/exports on the master\n** Import by $AW_HOME/imports\n** Need DBA role\n* Debugging\n** There are fancy debugging options which are set using bitwise arithmatic.\n** Can also change the debugging info in {{{awenv.ini}}} which is the main config file.\n* Roles and Security\n** Want to create a maintenance roll if users are not in the DBA group. If this is not done users will be able to create objects but not see them.
Tom Standage - "The Victorian Internet" - A book on Telegraphy.\n\nMarkets are driven by: Safety, prosperity, and solicitation like Maslow's hierarchy of needs.\n\nUsed examples - Telegraph, radio, internet\n\nSoftware - Don't break, be useful, be pretty\n\nApple focused on interface rather than functionality and won the music player war.\n\nYour product is a careful balance of features functionality and fun.\n\nSilly:\n\n"does it make me last or help me out?"\n\n\n
Creating commands dynamically with while read:\n\n{{{ ls | while read l; do echo ls $l; done | bash }}}
Kevin Scaldeferri from Yahoo\n* Speaker does not use Erlang\n* Erlang language\n** Interpreted\n** A fusion of Prolog and ML\n** Has concurrency primitives\n** Created by Ericson for telecom applications in 1987\n* Concurrency primitives - spawn, ! (send) and receive\n* Example algorithm 1 - quicksort\n** Stolen from:\n** made the example parallel by changing map to pmap! But this is 10x slower than the sequential version :(\n*** the problem is that the algorithm does not do enough in each step to warrant the overhead of the process management\n*** A web spider would make more sense for pmap\n!Distributed Systems\n* Erlang Twitter implementation\n* Each user is an Erlang process and messages map to themselves\n* On commodity hardware can typically run tens of thousands or hundreds of thousands of Erlang processes.\n* Distributing requires using the global module\n** {{{global:register_name(Name, Pid)}}}\n** {{{global:send(Name, Msg)}}}\n* Want a reliable distributed system\n** There is a framework for this called OTP (Open Telecom Platform). This is not necessarily specific to telecom.\n** OTP uses behaviors which are plugged into\n** His example used the gen_server OTP behavior\n* "Erlang makes adding concurrency to your programs nearly trivial"\n!Setting up a cluster\n* use a shared secret for security\n* distribute a standard configuration so that machines know how to join\n!Resources\n*\n* #erlang on freenode\n*\n* CEAN\n* Web servers\n** [[yaws|]], [[erlyweb|]] and [[mochiweb|]]
Quinn Norton\n\nBody modification defined: Acting on yourself, with or without assistance, to enhance the function of our body or your perceptions. Enhance is the key word. "If you can't open it, you don't own it" - Make Magazine.\n\nHumans have more neuroplacticiy than other animals (we can reconfigure our brains). \n\nBody monitors are coming out. People want to get their medical data.\n\nI stopped taking notes at this point as I started feeling faint.
Manual\n\n* Capistrano 2.0 requires that you have a local with the correct public key. I created an empty and got a cryptic error message.
!CPAN Problem\n\n"Just use the CPAN shell" - bad advice - fails too often and gets the latest versions\nHe put everything in a local directory. This is nice because different CPAN configurations could installed twice on one machine. The presenters solution was to write a Perl script build everything (including apache). Expect was used to answer questions, and tests were not run. Would have preferred to build binary distributions. See build system in Krag: .\n\n!Database Versioning\n\nUsed a rails like model. [[LVM|]] for snapshots worked a lot better than vmware. Vmware took a long time and LVM was a matter of seconds.\n\n!Config\n\nUsed Config;:~ApacheFormat - basic scoping and inheritance\n\nPeople will ignore config option they don't understand. Things you rarely change shouldn't be in the shipped config file.\n\n!Version Control\n\nA discussion regarding git vs. svn:\n\nI left this session 10 minutes early as I have already heard much of what he was saying about testing.
Background: #fff\nForeground: #000\nPrimaryPale: #8cf\nPrimaryLight: #18f\nPrimaryMid: #04b\nPrimaryDark: #014\nSecondaryPale: #ffc\nSecondaryLight: #fe8\nSecondaryMid: #db4\nSecondaryDark: #841\nTertiaryPale: #eee\nTertiaryLight: #ccc\nTertiaryMid: #999\nTertiaryDark: #666\nError: #f88\n
!Starting and Stopping\n\n!Determining the current version\n\ndb2level - I think this is only a client side thing\n\nYou can also see the version when you connect via the command line.\n\n! Nothing table\n\nLike Oracle's dual table DB2 has sysibm.sysdummy1. To select the current date:\n\n{{{ select current_time from sysibm.sysdummy1 }}}\n\n! Help on Error Messages\n\nIf the error message contains a string like SQL0803N then you can get nice help by doing this from the command line:\n\n{{{ $ db2 "? SQL0803N" }}}\n\nOften times it will include SQL which can be used to track down the human readable column names from the numbers in the error message.
The idea of DBD::Gofer is to be better than DBD::Proxy.\n\nDBD::Gofer is a scalable and stateless proxy architecture. Development was sponsored by ShopZilla.\n\n!Classes\nDBI::Gofer::Transport::null - useful for benchmarking and testing.\n\nDBD::Gofer::Transport::stream - ssh - there is also a DB::Gofer::Transport::stream for the other end of the connection..\n\nDBD::Gover::Transport:http - sends requests as http posts. The server usually runs mod_perl running the DBI::Gofer ::Transport::Http. Can be used for hiding real DBI connection info.\n\nDBD::Gofer::Transport::gearman - Written by Brad Fitzpatrick.\n\nDBD::Gofer::Policy - defines how many round trips to do. Cannot manually clear the cache although Tim said he would add that feature after I asked if you could manually clear the cache.\n\n!Caveats\n* no transactions\n* can't use temp tables, locks, and other per-connection persistent state (ShopZilla gets around this by using stored procedures for anything which requires a transaction).\n\n!Examples\nUsing HTTP load balancers and proxies as a database cache with Gofer with a new middle tier.\n\n!Error Handling\nDBD::Gofer can automatically retry on failure. Can define our own retry behavior.\n\n!Proxy vs. Gofer\nProxy is not well tested, however does support transactions.\n\n!Future\n* http caching - may be easier to implement than memcached\n* JSON - turns DBI into a web service.\n* client caching. Could work with memcached.\n* could implement transactions with http KeepAlive\n\n!Slides\n\nThe slides from the OSCON presentation are located on CPAN at
!Pluggins\n* subeclipse for svn\n* myEclipse is a commercial product which manages pluggins like the Tomcat.\n!Meta Data\n.project and .classpath files which can be checked in to svn and work for everyone.\n!Misc. Tips\n* put class files in a different directory when creating a new project\n* if unit tests are put in a different directory, you need to tell eclipse that source code exists in that new directory. (Project Properties, Java Build Path, Source tab, Add folder)\n* Ctrl + <space> brings up the suggestion dropdown.\n* Quick fixes are helpful\n* If you Ctrl + <space> after starting a method, you get a form that you can tab through to fill in your arguments.\n* Ctrl + F11 = run last launched\n* Shift + Ctrl + T = Show types, Shift + Ctrl + R = find anything\n* There is a VI plugging for eclipse!\n\n* use JDBC Template
!Commanding Heights\n* Norilsk - Soviet industrial city which had forced laborers who were political prisoners.\n* Oleg Gordievsky - Soviet double agent - not fatally poisoned in 2007.
[[Practical Erlang Programming]]\n[[Beautiful Concurrency with Erlang]]
Looked at API's for writing word documents and was scared away.\n\nUsed open office format and then generated PDF"s from that.\n\nUsed UNO to convert OpenOffice documents to PDF and Word. Used S3 for communication with a separate server and was complicated.\n\nS3 has geographic generation.\n\nODFToolkit with make OpenOffice less monolithic.
''[[vestigial|]]'' - Software evolves. In biology, evolution leaves behind vestigial organs. Vestigial organs, like the appendix, cause problems in biology as well as in software systems.
* Slides:\n* Both a new Python 2.6 and 3.0 versions were released.\n* Highly recommends "Python in a Nutshell" by Alex Martelli (O'Reilly).\n* Names are not typed but values are.\n* Namespaces\n** each function call has a local namespace\n** each module has a global namespace\n\nI left this talk at the break as the speaker was pretty much sticking to the slides which I already have.
OSCON 2008, Monday 7/21, 2008\n\nCourse notes:\nThe speaker is a Django core developer.\n\n
!SCJP\nI passed the Sun Certified Java Programmer 1.5 exam on 2007-10-22! Here are the notes I took to help me study.\n\n!Exam Topics\nJavaSyntax\nJavaObjects\nJavaStrings\nJavaIO\nJavaArrays\nJavaExceptions\nJavaDataStructures\nJavaAccessControl\nJavaThreads\nJavaInnerClasses\nJavaGenerics\n\nJavaCertificationTest\n\nMany of the examples in the notes are taken from the book "SCJP Sun Certified Programmer for Java 5 Study Guide."\n!Other \n[[Eclipse]]\nJavaQuestions
The levels of access control are (in order of least to most restrictive): public, protected, default, and private. Protected is like default except that protected methods can be seen outside the package by extending classes.\n\n''All methods in interfaces are implicitly public.'' Because what would be the point of a non public interface?
There are three steps to using an array:\n# declare: {{{String[] mystrings;}}} \n## It is ''illegal'' for the length of the array to be determined here so ''no'' {{{String[5] ...}}} \n## the location of the [] does not matter much so it could be {{{String mystrings[];}}} but Java people prefer the first way for readability\n## reference: chapter 1 of scjp, page 55\n# construct: {{{String[] mystrings = new String[5]}}}\n## for two dimentional arrays, only the first dimension is initialized at first and other dimensions are optoinal. {{{int array[][] = new int[3][]}}} Other dimensions can be different sizes (not a rectangle).\n## reference: chapter 3 of scjp, page 39\n# initialize: {{{Dog[] myDogs = {new Dog("Clover"), new Dog("Aiko")};}}} - shorthand\n## it can also be initialized one at a time\n## multi dimensional shorthand: {{{int[][] scores = {{5,2,4,7}, {9,2}, {3,4}};}}}\n## construction and initialization can be done on one line: {{{args = new String[]{"."};}}} .\n### These are referred to as //anonymous// arrays. This is helpful for re-initializing an existing array or passing without declaration to a method.\n### ''notice'' that there is no length passed into the rvalue. Instead the number of comma separated values in the curlies are counted.\n## reference: chapter 3 of scjp, page 42\n\n''Casting''\n* Array elements are automatically casted like scalars.\n* Primative Array's themselves do not cast, but Object ones do.\n* It is not possible to assign a 2D array to a 1D array.
Java practice test, 76 Questions.\n\nHow many questions does the actual test have? 65?\n\nTo review:\n* Thread.join()\n* java -cp and CLASSPATH. CLASSPATH must contain the directory which has .class files or a \n*.jar file. - See chapter 10 of SCJP\n* Data structure API - 10 of SCJP and Learning Java\n** Generics\n* File IO - try reproducing some Unix programs\n* Two minute exercises\n
!Classes\n\nAll the below inherit from java.util.~AbstractCollection .\n\n* List <<interface>>\n** ~ArrayList\n**
* try/catch/finally - each try block must be followed by a catch and finally or both. The finally block ''always gets executed.'' Even if there is no exception thrown the finally block still gets executed. The idea here is that the finally block provides a consistent way to cleanup after a try block.\n\n* What is the syntactical difference in the definition of checked an unchecked exceptions?
See chapter 7 of the SCJP book starting on page 584. "Making Your own generic Class" starts on page 598.
Page 19 of chapter 6 of the SJCP book has a good overview of the classes.\n\nWriter classes are for characters and Streams are for data. The only Stream objectives are for serialization.\n\n!!File IO Class Overview\nThere are a lot of wrapper classes. The Java IO package implements the Gang of Four decorator pattern.\n\n* ''File'' - File or directory meta data. Creates, deletes, file and directories; lists directories.\n* ''~FileReader & ~FileWriter'' - OS buffered read and write to files. Passed a ''File'' object or ''String'' to know where to read and write to.\n* ''~BufferedReader & ~BufferedWriter'' - provides buffering and the readLine and writeLine methods. Can only be created with a Reader or Writer.\n* ''~PrintWriter'' - provides formatting methods. Can be instanciated with a File, String, Writer, or ~OutputStream.\n* Page 26 of chapter 6 of the SJCP has at table of the IO classes covered on the exam.\n\n!!Object Serialization\n* Page 85 of chapter of the SJCP has an overview of the serialization classes.\n* {{{transient}}} instance variables are not serialized\n\n!!Dates\n\n!!Regular Expressions\n* the \s in meta characters needs to be escaped which is annoying so "\s\sd" would match one number.\n\n\nLeft off on SJCP page 33, Serialization.\n
!Types\n* regular\n** Decloration\n{{{\nclass MyOuter {\n class MyInner { }\n}\n}}}\n** Instantiation from outside the outer class, ''must have an instance of the outer class'':\n{{{\npublic static void main(String[] args) {\n MyOuter.MyInner inner = new MyOuter().new MyInner();\n inner.seeOuter();\n}\n}}}\n** Referencing the outer instance\n{{{\nclass MyInner {\n public void seeOuter() {\n System.out.println("Outer class ref is " + MyOuter.this);\n }\n}\n}}}\n* static\n** {{{static className}}} means that the inner class can only access static members of the outer class.\n** The keyword {{{static}}} cannot be applied to normal outer classes.\n** Instantiation outside outer class: {{{BigOuter.Nest n = new BigOuter.Nest();}}}\n* method local\n** can only be instantiated within that method.\n** can not be declared with access modifiers\n** can access the same variables as regular inner classes but only {{{final}}} method variables. This is because methods use a stack and objects use the heap. The variables on the stack may go away before the references from the heap.\n* anonymous\n** since you are forced into a specific type, you cannot call methods not defined in that type even if you define the methods in the anonymous class.\n** there is no mechanism for implementing multiple instances anonymously\n** ''declaration requires a closing semi colin {{{};}}}''\n** method argument declaratoins require a semi colin at then end of the method call as usual.\n\nOne of the major motivations of inner classes is to see everything about the outer class including private members.\n\n!Questions\n* Can classes be nested to an arbitrary depth?\n* Does the compiler warn if a member variable of an inner class masks a member variable of the outer class?
Constructors do not inherit! Custom constructors must be explicidly provided in the sub class even if they are identical to the constructors in the super class. Was this done as an optimization?
* How does one write code to do something with annotations? java.lang.annotation?
JavaScriptToLookUp - things to look up\n\nJavaScriptSyntaxNotes
''Basic Data Types''\n\n''undefined'' is the keyword for Perl's undef.\n\nif(variable != undefined) { do something }\n\n''Boolean''\n\ntrue and false are keywords.\n\n''Complex data structures''\n\nvar config = {\n // hash of hashes\n options: {\n chkRegExpSearch: false,\n chkCaseSensitiveSearch: false\n }\n // hash of arrays\n notifyTiddlers: [\n refreshMenu, refreshStory,\n refreshTabs\n ]\n}\n\n// Access an attribute\nvar value = config.options.chkRegExpSearch;\n\n// Assign to an attribute\nconfig.options.chkRegExpSearch = value;
var e = document.createElement(theElement); - used in this site\n\nHow to get the class or type of an unkown object? ref() in Perl. Can't remember operator in Java, perhaps type? This might be the valueOf method.
Indexes are zero based.\n\n!String Classes\n* ''String'' = points to one literal string in memory (which is immutable).\n** Any operations performed on the string create a NEW string in memory which is returned by the expression.\n** The literals in memory are only stored once per unique string.\n** The string class is final so this memory management behavior cannot be overridden.\n* ''~StringBuffer'' = mutable and thread safe\n* ''~StringBuilder'' = mutable and not thread safe (faster)\n\n!!API Notes\n* when string methods take a beginning and an end, the beginning is 0 based and the end is 1 based\n* .length is an attribute of arrays. .length() is a method of strings.\n\n|!immutable|!mutator|\n|concat|append|\n
!Loops\n\nEhanced for loop syntax:\n{{{\nint [] a = {1,2,3,4};\nfor(int n : a) // enhanced for loop\n System.out.print(n);\n}}}
!Thread States\n\nStates are defined in the Thread inner class Thread.State which is an Enum.\n\n!!wait, notify, and notifyAll\n* Think of a waiting room analogy.\n* ''must be called from a synchronized context''\n* are all instance methods of Object\n* wait() can throw an InterruptedException like sleep.\n\nImportant paragraph from [[SCJP]] page 728:\n\n"The moral here is that when you use wait() and notify() or notifyAll(),\nyou should almost always also have a while loop around the wait() that checks a\ncondition and forces continued waiting until the condition is met. And you should\nalso make use of the required synchronization for the wait() and notify() calls,\nto also protect whatever other data you're sharing between threads. If you see code\nwhich fails to do this, there's usually something wrong with the code—even if you\nhave a hard time seeing what exactly the problem is."\n\n!! Sillyness\n* ''Only object can be synchronized. Primitives may not be synchronized.'' Keep in mind that in a lower level languages like Java (in relation to Perl), primitives are closer to the machine so it would be overhead to include locking semaphores.
Ttey use master - master replication with even odd keys.\n\nCurrently comes with one utility: schwartzmon. Other utilities are available with the Livejournal source.\n\nRunning xinitd on all hosts to control and query services on hosts.\n\nWeb page:
!Categories\n<<allTags>>\n!Blog!\n*<<newTiddler>>\n*<<newJournal 'DD MMM YYYY' journal>>\n\n!Meta\n*<<closeAll>>\n*<<permaview>>\n*<<saveChanges>>\n*<<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
There are many variants of Lisp. Eric uses [[ACL2|]] which is side effect free Lisp.\n\nScheme is anohter populart variant. Eric recommended the book [[The Little Schemer|]] to learn the language. This book is also very popular on Amazon. The web site also has another free book about Scheme for beginners called [[How to Design Programs|]].\n\nEmacs has its own version of Lisp.
\n!Culture\nImportantWords\n\n!Databases\nMySQL\n[[DB2]]\n[[Oracle]]\n\n!Events\n[[NFJS2010]]\n[[OSCON2008|OSCON 2008 Notes]]\n[[YAPC::NA 2008|YAPC::NA2008 Session Notes]]\n[[OSCON2007]]\n\n!Languages\n[[Bash]]\n[[Erlang]]\n[[Java]]\nJavaScript\n[[Lisp]]\n[[Perl]]\n[[Perl6]]\n[[Python]]\n[[Ruby]]\nSqL\n\n!Methodology\n[[Refactoring]]\n\n!OS's\n[[Unix]]\n\n![[SCM's]]\n[[svn]]\n\n\n!Tools\n[[apt]]\n[[Capistrano]]\n[[Eclipse]]\n[[find]]\nMySQLGUI\n[[netcat]]\n[[irc]]\nProjectManTools\n[[rsync]]\nSeleniumTesting\nTiddlyWikiSyntax\n[[vim]]\nAppWorx\n\n!WebDev\n[[Rails]]\n\n!Reference\n[[Unix2Dos]]\n\n!Applications\n[[MoneyDance]]\n\n--------\n[[Reading]]\n\n--------\n[[Economics]]\n\n<<newTiddler>>\n<<newJournal "DD MMM YYYY">>\nMainMenu\n\n^^[img[favicon.ico]] TiddlyWiki <<version>>^^
Suspend resume sucks because ACPI moves the logic from the firmware to the OS.\n\nXRANDR 1.2 - a new project for managing displays and second monitors which 1.3 or higher is required. The right hardware is from Intel\n\nLaptop hotkeys.\ndmsg (the kernal log) will tell you what the keys are used for. Setpcodes can be used to reconfigure the keyboard bindings. There is a Thinkpad ACPI driver. You can then add scripts to the ACPI deamon to hook into this. 2.6.23 integrates more of these drivers. i8042 is the standard for mouse and keybard input that is not followed enough.\n\n!Flash readers\n* SDHCI driver manages most SD readers\n* tifm managers most of the rest\n* make sure tifm_sd and mmc_block are loaded\n* Memory stick and XD are not supported.\n\n!Webcams\n* gspca supports a lot of them\n\n!Good plan\n* get a laptops with as little custom hardware as possible (big name vendords are usually better here - not Sony)\n* get a laptop used by as many kernal or distribution developers as possible (better plan)\n* buy from a company like EmporerLinux who builds Linux supported laptops.\n\n\nUrbuntu contains a lot of drivers but they may be low quality.\n\nMorale of the story: buy a Mac :(\n\nThe only good non reverse engineered driver WIFI drivers are from Intel.
It self defeating to get upset in politics, management, schedules, etc. in your job.\n\nFall into a trap of thinking us vs. them. All relationships are the same (spouse and manager).\n\nOur common mistake is to assume that managers will be interested in technology for technology sake.\n\nNeuro Linguistic Programming (NLP)- Pacing and Leading. This has a negative connotation as it can be seen as a way of manipulating people.\n\n!Meta Modle\n* Deletions - something left out - "I'm upset."\n* Distortions - mind reading or false causality\n* Generalizations - universal qualifiers or modal operators\n* Nominalizations - pretend that an abstract thing is concrete - "Leadership at our company is weak."\n* Complex equivalences - connecting two things without rationale\n* Lost performatives - A value judgment that deletes the attribution for the judgment - "It is ..."\n\nRapport is the foundation of successfully communication. The foundation of rapport is respect. Look for something that the other person wants that makes sense. You don't have rapport when you can't see the other person's point of view. Look for places of agreement before disagreeing with an opinion.\n\nYou can detect visual facial changes on the order of a micron.\n\nBook: "Influencing with Integrity" 0-961372-0-5\n
The tab delimited format exports the entire file with all accounts. Unfortunately there is no way to export a single account. The export file has two lines; one for each side of the transactions. One of the goofy things is that the export is sorted by the date entered column which is different from the date column which shows up in the app.\n\n!Columns\n* Date - same as the date field in the application\n* Credit/Debit Status - 40 = Uncleared, 30 = Reconciling, 20 = Cleared\n* Credit/Debit Account - numbers can be looked up in the second table of the export. In my case 1 is checking and 2 is savings.\n\n!How to Get a sorted list of the credits to the checking account currently being reconciled (requires a Unix shell and Perl)\n* export to a file called {{{md_export}}}\n* delete the first two tables\n* {{{$ perl -ne'next if /^[-#]/; @cols=split "\st"; print "$cols[9]\sn" if $cols[5] == 30 && $cols[6] == 1;' md_export | sort -n}}} \n\n\n
The RESET QUERY CACHE statement removes all query results from the query cache. The FLUSH TABLES statement also does this.\n\n{{{set sql_mode='only_full_group_by'}}} will enforce that columns outside of the group by clause cannot be included in the select column list. This is helpful as the results of nonsense columns are non-deterministic and can break testing. [[This article|]] has more info.\n\nSubSelects
''Essential DBMS GUI Feature''\n\n * ''Keystroke'' query execution - Mousing should not be required for executing a free form SQL query.\n * Query ''Save'' - The ability to save certain queries\n * ''Multiple'' Queries - Multiple queries can be run and results viewed at a time\n * ''Active'' Query - Execute the highlighted or query in the clip board\n * ''Blob & Text'' View - See blobs and large text sections in any table view (includes custom queries).\n * Adjustable Character ''Encoding'' - Can switch between Latin1 and UTF8 character sets for query results.\n\n||Keystroke|Save|Multiple|Active|Blob & Text|Price/License|Encoding|Notes|\n|Cocoa MySQL|N|Y|N|N|Y|GPL|Y|Crashes Often|\n|Navicat|Y|Y|Y|N|Y|$95 for 3|Y|Overall Good|\n|YourSQL|Y|N|N|N|N|GPL|?|Not enough features|\n|MySQL Query Browser|Y|Y|Y|N|Y|Open Source|N|Beta only for OSX, crashes often|\n|Aqua Data Studio|Y|Y|Y|?|?|$139 for three|N|encoding is in Latin1 for OSX. Plans fix this in a later version|
Peter Bell\n\nBrought up the value of fun in selecting a technology by referencing two studies: (1) that people are not that much happier after they make more than 75K and (2) building bionicals.\n\nTechnology adoption curve.\n\nCore vs. incidental\n\nSize of the community vs. passion in the community. Closure vs. php programmers.\n\nEasy way to pick a technology: spike on it.\n\n!Adoption Process\nBook: Driving Technical Change - how to persuade teams to adopt technologies\nBook: Knowing doing gap\n\nWhen talk substitutes for action: death by meetings.\nThe power of precedent because following it is less risky. Ask why five times; root cause analysis.\nDemming: rooting out fear was the most importing thing in improving an organization. An organization has to allow for failure.\n\n!Driving Technical Change\n!!The case of characters...\n* the uninformed - be careful how to handle this group because they can turn into the herd.\n* the herd - sub types: newer people and un-passionate people\n** need to take a leadership position to help move the herd\n* the cynic - there is a social benefit to be a cynic. The presenter referenced a study where people were asked to assess the intelligence of paper reviews. The negative reviews were almost always seen a smarter.\n* the burned\n* the time crunched - sub types: seasonal and generally busy\n** common anti pattern - we don't have time to do it right be we will do it twice\n* the boss\n* the irrational\n!!Strategies\n* gain expertise\n* deliver your message\n* demonstrate your technique\n* propose compromise\n** types of rules where compromise can be used:\n*** absolute rules\n*** rules without a because\n*** security based rules\n*** industry best practices\n* create trust - don't hide by omission\n* get publicity - ie: validate a technology externally to the organization by open sourcing something. "You can never be a prophet in your home town."\n* focus on synergy\n* build a bridge - ie: write an automated test for bugs only for an organization which does not use automated testing.\n* create something compelling - ie. create a shell application with advanced techniques to train an unsophisticated team.\n\nNot only technical debt but also innovation debt within a company.\nTheory of constraints: there is one thing in any system which is the limiting factor.\n\n!Seven secrets of technology selection\n1. know thyself\n2. don't sweat the small stuff\n3. spikes rock\n4. use then sell\n5. demonstrate results\n6. always be adding something\n7. one at a time
{{{java -verbose:class}}} shows all of the classes that are loaded.\n\njavap\n\njdk/jre/lib/ext directory contains jars which are implicitly available to the extensions class loader\n\n!Class Loader Laws\n* Classes are lazy loaded. *Very* lazy.\n* Every class has an associated class loader {{{App.class.getClassLoader()}}} or {{{Class.forName("App").getClassLoader()}}}\n** The JVM has a bootstrap class loader implemented in native code,\n** The bootstrap loader exists outside of the Java security system.\n* A classloader always delegates to it's parent first.\n* A class's uniqueness is determined by it's package name, class name, *and runtime classloader instance which loaded it*.\n\n!Kinds of dependencies\n* static - must load class B in order to load A.\n* dynamic\n* runtime\n\nThe static initializer block gets called when the class loader *resolves* the class. Sun split up the class loader in 1.2 into two parts: class loading and class resolving. This was done to speed up application startup.\n\nThe single argument version of Class.getClassLoader() uses the app class loader.\n\nThe default class loader is the class loader which loaded the current class.\n\n!The context class loader\n{{{Thread.currentThread().getContextClassLoader()}}}\nAllows classes which were loaded by an early class loader to load new classes in the current threads class loader which may be a much deeper class loader child.\n\nJava can't unload classes.\n!First class loaders\n* Native\n** Extentions\n*** App\n\nThe servlet specification breaks the usual class loader model because it states that classes should first be loaded from the WEB* directories.\n\n\n!Making a custom class loader.\nUse as it takes care of the \n\n{{{\nURLClassLoader ucl = new URLClassLoader(new URL[] { new File("./subdir").toURL() }, oldCL); // Specify it's parent class loader!\nThread.currentThread().setContextClassLoader(ucl);\n// and then revert the contextClassLoader to it's original context\n// URL's are deprecated so there will be a warning. However, Sun did not provide a URI class loader.\n}}}\n\n*Statics are only statics to classloader boundaries!*\n
Speaker: Ken Sipe\n\nRoot Set: data structure used for mark and sweep garbage collection.\n* There have been many optimizations in the JVM to make object creation and destruction cheap. Don't try to program around it by creating unnecessary singletons.\n\nWe can allocate memory faster in the JVM than in C in many cases.\n\nPermanent Space: where class information is stored.\n\nGood article on JVM memory management:\n\nThere are both major and minor GC's. A minor GC happens when eden fills up and a major GC happens when old space fills up.\n\nJava 7 is coming out with a new collector called G1 which has four spaces like the CLR,\n\nRan the Java2D demo in the background to show an active process.\n!Tools\n* jps (berkley's ps has a flag to see the entire commandline) available since 1.5 in the bin directory\n** -v = show complete command line\n** -l = show main class\n** jps <remotehost> === requires jstatd on the remote host\n* jstat - shows real time memory usage.\n** jstat -gcutils 250\n* VisualVM - GUI swiss army knive - already in the jdk (as of 1.6) .\n** can show deadlocked threads, current threads\n** ThreadContentionMonitoringEnabled - gives more thread detail for a little more overhead.\n* jmap - diff between -histo:live and -histoy to see a diff in the heap. Heap dumps will have negative impacts on production.\n* visualgc is a plugin for visualvm.\n* jhat - creates a local web server on port 7000 which visualizes the output of jmap\n** nomenclature: [I = an array of integers\n** Execute an Object Query Language (OQL) query.\n* jinfo - change flags within a running VM. Can also be done via mbeans.\n* jstack - get a dump of threads\n* JTop -.jar in the demo\smanagement\sdirectory to see the top threads\n\n\nHuge dips in major GC's are concerning in nominal conditions.\n\nStateless applications should have a lot of new space.\n* mat (memory analyzer toolkit)\n\njava.endorsed.dirs = certificate search directories.\n\nWant larger old spaces on clients or bath processes.\n\n!BTrace: dtrace for Java\n* Like dtrace for Solarice or mac\n* hooks into dtrace\n* Only work in Java 5.\n* A btrace agent lives in all VM's.\n* There is a VisualVM btrace plugin.\n* A class is available by BtraceUtils.\n* There is an unsafe mode witch no rules for modifying existing code.\n* There are JDBC examples in the docs.\n* Can monitor file access.\n\nSetting permsize on JVM startup speeds it up as it does not have to auto detect it.\n\nWily Intrascope is an expensive alternative to btrace.\n\nUse web analytics to determine common use cases of your ap and then tune for that.
Allister Cockburn looks at software development as a game with three decisions:\n1. Invent\n2. Communicate\n3. Decide\n\n"Developers make critical decisions about every 15 minutes." - Mary Poppendieck.\n\n!Cognitive Biases\n* Overconfidence - effects us during estimation\n* Sunk Cost - "we've come so far", "we can't stop now", "we've put so much into this"\n* Confirmation bias - ignore evidence which does not confirm your model of the world. Antidote: work on a diverse team.\nBoundedly rational - phrase for human rationality used by behavior economists.\n\nProposals Framing: keep risks and opportunities in mind.\n\nIntuition: can be very valuable but it is hard to communicate. A trusting team helps this. Intuition is a way to search through experiences.\n\n!Team decision making\n* Process losses - something that causes us to work as a team less well than we should. ie. bad meetings\n** Causes\n*** conformity\n*** fault line - aka. tribalism\n*** air time - when one person dominates the conversation. More difficult for off site team members.\n*** team parasites - need a way for teams to hold individual members accountable\n*** information flow - information needs to flow up in an organization as much as it should flow down\n* Groupthink - symptoms: when nobody argues for a couple of weeks. When one person has to speak first in team decisions. Antidote: encourage conflict. Members of a team need to feel safe for disagreeing with each other. What happens to nonconformists?\n** tools for allowing nonconformists:\n*** The Red Pencil award - a teacher who rewarded the student with the most mistakes. However, a student could not get the reward by making the same mistake twice. This allowed students to take chances. ie. give out prizes in retrospectives for identifying the best mistake made.\n*** Red Team vs. Blue Team\n*** Devil's advocacy - help expose new information. Hard to find someone who can do this effectively.\n* Managing conflict\n** cognitive vs. affective debate\n* Inability to commit
Suggested standardizing on a build system and not an editor or IDE.\n\n!Ant\nPros\n* cross platform\n* powerful\n* control\nCons\n* Verbose\n* haphazard/lack of standards\n\n!Maven\nPros\n* dependency management\n* jars live in a repo\n* convention over configuration\n* plugins\nCons\n* Hard to deal with things which fall outside of the Maven vision\n\n!Gradle\n* Ant + Ivy + Groovy\n* declarative DSL\n\n{{{\ntask hello << { // without the left shift this becomes configuration instead of addative code\n println "hello chicago"\n}\n}}}\n
Emergence is when games or player imposed rules appear within games.\nJessie Schell: book "The Art of Game Design"\n\n!Core game concepts\n* territorial acquisition\n* prediction\n* spacial reasoning\n* survival\n* destruction\n* building\n* collection\n* chasing/evading\n* trading\n* race to the end\n* goal/pursuit
C++ had three paradigms: procedural, OO and meta programming via templates.\nJava had one originally: OO.\n\nDifferent paradigms help us manage commonalities and variabilities. According to James Coplien.\n\nSometimes even procedural paradigms have value. For example printf over cout in C++.\n\nJava is accidentally multiparadigm.\n\nA lot of design decisions are aesthetics driven.\n\nPositive and negative variability. Much easier to deal with positive variability.\n\n!Types of paradigms\n* Procedural: commonality are the data structures and the variability are the procedures.\n* OO\n** two dimensions of commonality: behavior and structure\n** interfaces: clean separation of behavior from stucture\n** inheritance\n*** suggested that the Open/Closed Principle is dead because everyone loves the ability to read the source of open source software.\n** strong behavioral subtyping\n* Metaprogramming\n** automatic (code generation) - seen as a code smell; metaprogramming of last resort. ie. xdoclet\n** generics - parametric polymophism\n** reflective - attribute-oriented\n* Dynamic\n** variability becomes names\n* functions separate behavior and structure
!Issues with SQL\n* scaling\n* performance\n* schemas - pain in putting things in a relational schema\n* DBA's :)\n\nNow that we have tools for dealing with larger data sets, we will see a market requirement for this.\n!Four types of NoSQL\n1. Key/Values - ie. Amazon Dynamo. Want: speed and scale but not complex queries. Use cases: shopping carts, persistent caches. Alternatives: Voldemort, Redis, MemcacheDB\n2. Column Based - ie. BigTable. Gives atomicity across multiple values. Usually a limited query capability. Use case: logging. Useful where column values have varying size. Implementations: Cassandra, hadoop\n3. Document - generally richer querying and potentially ad hoc querying. Use cases: powerful queries, eventually consistent, flexible schema. Possible uses: product catalog, articles/CMS. Alternatives: CouchDB, SimpleDB, Apache Jackrabbit.\n4. Graph - ie. Neo4j; can be used to support SQL. Alternatives: AllegroGraph, InfoGrid, FlockDB.\n\n!Examples\n* Riak(key value) - Lucene based query language; map reduce queries.\n* Cassandra(column based) - Facebook's implementation of Bigtable.\n* MongoDB(document) - documents are stored in JSON. Broken down into collections. Ad hoc queries - pass a JSON document with the query info.\n\n\nSpringData, Grails are NoSQL abstraction layers.\n\nInsight: when it comes to NoSQL, think polyglot.
groovy.util.GroovyTestCase extends JunitTestCase\nGroovy tests can be run as if they had a main method.\n{{{groovy.mock.interceptor.StubFor}}} allows classes to be mocked *but only for Groovy code.*\ncodenarc is a static analysis tool for groovy
Centralized version control is always in a star pattern but distributed does not have to do this.\n\nWith distributed version control, the branching happens in the way the code is going - branching is less declarative and more observed. Illustrated problems with branching and merging with subversion.\n\nThe idea is to treat the repository as a data warehouse. Goal: find out more information about the code. Can show all commits which added or deleted a particular string:\ngit -log -S'string'\ngit -annotate -C : follows lines moving between source files\nVisualization tools: gitk, hgk, olive\n\nStable Development Model: this is easier because it is possible to drop bad changes. This can be done with feature branches but is harder and happens less.\n\n!Tools\n* Bazaar-NG - oldest - python based - slower. File - based backing which stores inode history. Generates purely UUIDS.\n* git - CLI, Sports the "Content Hashed Fileysytem" idea stolen from Monotone. Very popular. Only looks at content. History mining toolds are necessity. Occasionally misses renames when a lot of the content is changed. Revision ids are checksumed + hisotry.\n* Mercurial (hg) - released right after git.\n\nLightweight branches - work on multiple branches without copying the whole tree. git supports it the best. Add ons allow previous changes to be modified.\n\nEase of use: bzr and hg are good and git is very unixy although the newer versions have better docs.\n\nPortability: hg and bzr are portable. Git is not although there are rewrites and it is available via mingw.\n\nRepository size: bzr = fair, hg is pretty good, git - very tight pack - 10x smaller than svn.\n
!Monday 7/21\n[[Introduction To Python]]\n[[Programming Vim]]\n[[Introduction to Django]]\n!Tuesday 7/22\n[[Secrets of JavaScript Libraries]]\n[[Ubiquitous Multithreading for a Multicore World]]\n[[Practical Erlang Programming]]\n!Wednesday 7/23\n[[OSCON 2008 Opening Keynote]]\n[[OpenJDK]]\n[[Beautiful Concurrency with Erlang]]\n[[Perl 6 Upate|OSCON 2008 Perl 6 Update]]\n[[Web Frameworks of the Future: Flex, GWT, Grail, and Rails]]\n[[An Illustrated History of Failure]]
!Tim O'Reilly\n* Talked about the dangers of cloud computing and Web 2.0\n** Programming with Collective Intelligence O'Reilly book\n** Web 2.0 presents the problem of data lockin\n* Amee - Carbon calculator from dopplr\n* The browser wars are back on the phone\n* Talked very positivly about Google and Open Source\n* - another open source phone platform\n!Christine Peterson\n*\n* BOF tonight at 8:30\n* Foresight Vision Weekend Nov 15 -16, Silicon Valley\nSecurity and Privacy\n* "The best weapon of a dictatorship is secrecy but the best weapon of a democracy is openness." from Niel Boars the Physicist.\n* Nanotech\n** Sewer monitoring has begun for horemones. This could be used to detect drug use.\n* The US Government does not have good tools for WMD detection. However, they use top down tools like secretive surveillance.\n** Does not work becuase terrorism is a bottom up problem which is being combated with top down tools.\n* No secret software for public sensing data!\n!Dirk Hohndel - Linux for Next Generation Mobile Inernet\n* Chief Linux and Open Source Technologist - Intel Corporation\n* - mobile Intel linux\n* He was pretty boring and was mostly talking about Moblin which has been delayed.\n!Tim O'Reilly's interview with Monty and Brian Aker from MySQL\n* Sun is arguably the first successful Open Source company by taking BSD closed.\n* Adobe is one of the last remaining great closed source companies
!Library Policy\n* Longer module names which require information like version and authority\n{{{Text::Autoformat:< 2.0.1 cpan:DCONWAY>}}}\n* Can load up different versions of the same module in the same program!\n* Modules must specify which version of Perl they will run under correctly\n{{{use Perl:ver(6.0.1 .. 6.1.5);}}}\n** put a star at the end of the range goes to whatever version\n* Later versions of Perl 6 will emulate previous versions of Perl (down to 6.0.0)\n* Operator precedence table was reorganized\n* talked about // (defined or) and orelse operator\n* String increment works on any string. Looks for the last sequence of word characters and increments it.\n* Five types of variables: my, our (initialized at INIT), has (object member, initialized in instantiation), state, constant\n* Regex changes (I saw this at YAPC::NA 2008)
!Overview \n\nAll of the OSCON 2007 articles are linked off of this main tiddler. The tiddlers are all tagged with oscon2007 .\n\n!Schedule\n''NOTE'': the sessions I attended will have a link to another tiddler with my notes from that session.\n\n~Concurrency-Oriented Programming With Erlang\nTrack: BoFs (Birds of a Feather)\nDate: Monday, July 23\nTime: 6:30pm - 7:30pm\nLocation: D135\nModerator: Patrick Logan\nI currently have paper notes for this BoF\n\nOSCON2007Wednesday\n\nOSCON2007Thursday\n\nOSCON2007Friday
10:45 - 11:30 - [[Managing Your Manager]]\n\nAdventures in Copyright Reform, ZFS: Bringing Terabytes Under Control, Open Source Data … It’s Changing \n\nYour Life\n\nA Lexicon for Open Source\nRobert "r0ml" Lefkowitz, Vice President, Chief Information Architect, and Head of Risk Management \n\nTechnology, Asurion\nTrack: Emerging Topics\nDate: Friday, July 27\nTime: 11:35am - 12:20pm\nLocation: Portland 256 \n\nAlso interesting: Company Can Benefit from Open Sourcing Code
\n!Thursday\nOSCON2007ThursdayKeynotes\n\n[[Super-sizing YouTube]]\nMike Solomon, YouTube\nTrack: Python\nDate: Thursday, July 26\nTime: 10:45am - 11:30am\nLocation: Portland 256 \n\nThe lighning talks, wxPerl, dTrace, and Pimp My Build talks also sound interesting.\n\n[[Making Linux Work on Your Laptop]]\nMatthew Garrett\nTrack: Linux\nDate: Thursday, July 26\nTime: 11:35am - 12:20pm\nLocation: D136 \n\nAlso interesting: People Hacks, the GCC talk on automatic parallelism\n\n[[Next Generation Version Control Systems]]\nSam Vilain, Hacker, Catalyst IT (NZ) Ltd\nTrack: Programming\nDate: Thursday, July 26\nTime: 1:45pm - 2:30pm\nLocation: F151 \n\nAlso interesting: Databases Don't Matter\n\n[[Body Hacking]]\nQuinn Norton, Reporter, Wired News\nTrack: Emerging Topics\nDate: Thursday, July 26\nTime: 2:35pm - 3:20pm\nLocation: D133 \n\nAlso interesting: OSGeo: All About Maps, Accessibility for Web 2.0, Dispelling Legal Myths: Things OSS \n\nDevelopers Get Wrong About Law, Python 3000\n\n[[Keeping Your Workers In Line: Use TheSchwartz]]\nBrad Whitaker, Senior Software Engineer, Six Apart\nLisa Phillips, Six Apart\nTrack: Administration\nDate: Thursday, July 26\nTime: 4:30pm - 5:15pm\nLocation: D133 \n\nAlso intersting: Writing Big Apps with Google Web Toolkit, Current State of the Linux Kernel, Perl \n\nLighting Talks, The Absolute Minimum an Open Source Developer Needs to Know About Intellectual Property\n\nFrom Open Source to Open APIs\nJeremy D. Zawodny, Technical Yahoo, Yahoo! Inc.\nTrack: Emerging Topics\nDate: Thursday, July 26\nTime: 5:20pm - 6:05pm\nLocation: E145 \n\nPerl 5 Wikithon\nTime: 7:30PM - 8:30PM\nLocation: E145\nTrack: BoFs (Birds of a Feather)
There was an interesting visualization presentation from . He showed a lot of interesting examples of which I put several on my .\n\nNext was Robert Hanson who is an economic theorist who spoke about corporate decision making. Brought up cognitive biases like overestimation of work which can be done on a project. Book: "The Myth of the Rational Voter" which talks about problems in a Democracy with bias. Managers of software managers who prefer the ones that underestimate because that manager will work harder to make up for the underestimate. Betting markets are a good way to overcome bias.\n\nSurprisingly the next keynote was Microsoft - Bill Hilf who was leading their Open Source efforts. Commented on how he was put between the biases talk and the copyright talk. Microsoft Permissive Licence is what has been used for the DLR (Dynamic Runtime Language) and other projects. Port 25, Codeplex, and Chanel9 are Open Source websites. They have about 588 "Shared Source" projects. Microsoft is working with the OSI on licensing. Announced . A question was asked about to his ideas on software patents. He valued intellectual property but felt that the current patent system needs a lot of work. Overall he was very apologetic for Microsoft.\n\nThe Pirate Party of Sweden by Rick Falkvinge was the next presentation. The talk was titled Copyright vs. Civil Liberties. It is illegal to send music in email which violated privacy. Copyright is lobbying ISP's for monitoring email which violates the common carrier principle in which the postal service is not responsible for content being sent. One of his major points was that the issue was about privacy and civil liberties and not weather or not file shared helped or hurt media profits. .\n\nSteve Yetti from Google was next and talked about branding. Talked about the branding blunder of New Code. A brand in geek terms is a pointer or a placeholder. A brand is a proper noun which needs to own a word in a persons mind. Talked about brands that do mean anything like Kraft. Book: "22 Immutable Laws of Branding." Perl -> scripting, Java -> Enterprise, C++ -> Link Errors. Nabisco used to be "National Biscuit Company." The shocking names work well. GTE was a really crappy brand which invested a bunch in service and tech and their brand still sucked. GTE became Verizon because they learned that changing a brand around took a generation. Mentioned how Eclipse should stick with Java.rather than dilute their brand. Mentioned how there is not a brand leader in OpenSource licensing. The biggest problem with OpenSource is the work OpenSource.
10:00 - 11:30\nPerformance-Whack-a-Mole - Josh Berkus - Portland 251\n\n[[Care and Feeding of Large Web Applications]]\nTrack: Perl\nDate: Wednesday, July 25\nTime: 11:35am - 12:20pm\nLocation: Portland 256\n\n* Also interesting *\nBeyond the Padlock: Browser Security UI for the Distracted\nJohnathan Nightingale, Human Shield, Mozilla Corporation\nTrack: Security\nDate: Wednesday, July 25\nTime: 11:35am - 12:20pm\nLocation: D139-140 \n\n[[DBD::Gofer]]: A Stateless DBI Proxy. For SOA and more!\nTim Bunce, CTO, Data Plan Services\nTrack: Perl\nDate: Wednesday, July 25\nTime: 1:45pm - 2:30pm\nLocation: Portland 256 \n\n* Also interesting *\nMozilla Firefox and the Internet as an Open Platform\nMitchell Baker, CEO, Mozilla Corporation\nTrack: Web Applications (client-side and server-side)\nDate: Wednesday, July 25\nTime: 1:45pm - 2:30pm\nLocation: F150 \n\n2:35 - 3:20\n[[Perl 6 Update]] - Portland 256\n\n* Also interesting *\nThe Holistic Programmer\nAdam Keys\nTrack: Programming\nDate: Wednesday, July 25\nTime: 2:35pm - 3:20pm\nLocation: D139-140 \n\n* Also interesting from an environemtnal perspective *\nProgramming for Low Power Usage: It's Everyone's Responsibility\nArjan van de Ven, Intel\nTrack: Linux\nDate: Wednesday, July 25\nTime: 2:35pm - 3:20pm\nLocation: E143-144 \n\nWow, there are a lot of good session from 4:30 to 5:15 PM\n\nPerl 6 on Parrot\nPatrick Michaud, Consultant,\nTrack: Perl\nDate: Wednesday, July 25\nTime: 4:30pm - 5:15pm\nLocation: Portland 256 \n\n* Also interesting *\n[[Applying Maslow's Hierarchy of Needs to Technology]]\nRolf Skyberg, Disruptive Innovator, eBay, Inc.\nTrack: People\nDate: Wednesday, July 25\nTime: 4:30pm - 5:15pm\nLocation: F151 \n\n* Also intersting - see how Google handles open source projects creatd by them *\nA Year of Open Source at Google\nChris DiBona, Open Source Programs Manager, Google, Inc.\nLeslie Hawthorn, Program Manager - Open Source, Google Inc.\nTrack: Emerging Topics\nDate: Wednesday, July 25\nTime: 4:30pm - 5:15pm\nLocation: F150\n\n* Also interesting - compares "Web 2.0" programming to mobile device programming rather than desktop \n\napplication development *\nHigh-performance JavaScript: Why Everything You’ve Been Taught is Wrong\nJoseph Smarr, Architect, Plaxo, Inc.\nTrack: Web Applications (client-side and server-side)\nDate: Wednesday, July 25\nTime: 4:30pm - 5:15pm\nLocation: D136 \n\n* Also interesting *\nOpenJDK: The First Eight Months\nMark Reinhold, Java SE Chief Engineer, Sun Microsystems\nTrack: Java\nDate: Wednesday, July 25\nTime: 4:30pm - 5:15pm\nLocation: Portland 252\n\n* Looks very good! *\nHigh Performance Web Pages - This talk was in a room that was too small so it filled up before I got in.\nSteve Souders, Yahoo!\nTrack: Web Applications (client-side and server-side)\nDate: Wednesday, July 25\nTime: 5:20pm - 6:05pm\nLocation: D136 \n\n* Also interesting *\n[[Generating Gorgeous Word Documents, PDFs, and Excel Spreadsheets]]\nMichael Koziarski, Software Consultant, Koziarski Software Limited\nTrack: Ruby\nDate: Wednesday, July 25\nTime: 5:20pm - 6:05pm\nLocation: D139-140\n\nGPLv3 for People Who Aren't Lawyers\nTime: 7:30PM - 8:30PM\nLocation: D135\nTrack: BoFs (Birds of a Feather) \n\nUsing Amazon Webservices EC2/S3/SQS for computing on large data sets\nTime: 7:30PM - 8:30PM\nLocation: F150\nTrack: BoFs (Birds of a Feather) \n\nFree Software Activism\nTime: 8:30PM - 9:30PM\nLocation: D135\nTrack: BoFs (Birds of a Feather) \n\n* Speaker was recently hired by Sun and was on the Open Source side prior to that.\n* Timeline\n** 1996 - gcj started and Kaffe begins\n** Feb 1998 first GNU Classpath release\n** Dec 2008 - Eclipse running on GNU Classpath\n** Oct 2003 - GNU Classpath and Kaffe merge\n** Jan 2005 - starts using gcj\n** May 2006 - Sun announces Java will be open source\n** Jun 2008 - Fedora OpenJDK 6 built\n** Jul 2008 - Debian OpenJDK 5 built\n* Sun is using Mercurial for SCM for OpenJDK.\n* GNU Classpath and Friends\n** Created because VM's are fun to hack on\n** This is appealing for Java because you can borrow their class library\n** Covers different JVM niches and licencing niches\n* Role of distributions to get software out\n* OpenJDK\n** Released under GPLv2 (_ Classpath exception)\n** gradually replacing gcj as the default tuntime in distributions\n** Glassfish can now be packaged from source\n** Encumbrancies\n** IceTea project was intended to fill these in\n** Encumbrancies are now gone except for SNMP\n* IcedTea\n** Bootstrap OpenJDK using Free Software exclusively\n** Fill in encumbrancies\n** Allows bug fixes to be compiled into OpenJDK without waiting for Sun engineers to recompile\n** AMD 64 bit support\n** Collaboration point for getting OpenJDK into distributions\n* BrandWag is the inverse of OpenJDK for nice backwards compatibility\n* CACAO - small portable JIT, GPL'd and can use three different class libraries\n* - VM written in C#, runs on top of Mono and .NET\n** cross-complies bytecode into something compatible with .NET\n* SoyLatte is a patchset for Mac based on the BSD porters work\n* there are tons of other OpenJDK projects\n* there is such a difference between OpenJDK and Java from Sun because they released it too late in the release cycle for Java 6 and because of the encumbrances.
! Show Oracle Version\n\n{{{select * from v$version;}}}\n\n! Export DDL\n\nThere is a command line utitliy called {{{ exp }}} which can be told to not export '''rows''' and only generate DDL. A utility called {{{ imp }}} does a mass create.\n\n! Unicode\n\nSee OracleAndUnicode\n\n!Time Zones\n\nSee OracleTimeZones\n\n! See current locks\n\n{{{select * from v$lock;}}} although I am not sure what the columns mean.\n\n! Other Stuff\n\ntnsnames.ora has the database to host configuration\n\nops/oracle/tsnames.ora\n\nIn prod this file is readable:\n/opt/oracle/product/10.2.0/client1/netowrk/admin/tnsnames.ora\n\nCan createa ~/.tnsnames.ora\n\n! DDL Exploration\n\n!! Show Tables:\n\n{{{ select * from all_tables where owner = 'your schema name' }}}\n\n!! List stored procedures\n\n{{{\nselect * from all_objects\n\nselect * from all_source order by line number\n}}}\n\n! sqplus tricks\n\n/ reruns your query (like !! in unix shells)\n\nInside sqlplus use spool to save output\n\n! sqlplus alternatives\n- PL SQL Developer\n- Toad\n\nLimits\nselect * from table rownum between 2 and 6 (does't work with orderby)\nselect * from (select...order by x) where rownum between 2 and 5\n\nDescribe table\ndesc <tablename>\n\n!switch schemas:\n{{{exec util.switch_schema.reset_schema_synonyms('DSEU');}}}\ncreates synonyms in your user schema. Only one set of synonyms are saved at a \n\nAn alternative:\n{{{alter session set current_schema = dseu}}}\n\ntime. Schema changes are not updated automatically.\n\nCan also be explicit:\nselect count(*) from pfx.companydef;\n\nlooks in users tables, then local synonyms, then system synonyms. Can create \n\ndata integrity problems.\n\nTo run a file with commands:\nsqlplus rgerry@develdb @filename param1 param2 ...\n\nIn filename:\nselect * from all_tables where owner = '&1'\n\nOracleExplainPlans\n\n!Reference\n"Developers Guide Reference Manual" - good ref
!Helpful Functions\n\n!! unistr\n\nTakes a hexadecimal code point and return a unicode character.\n\n{{{select unistr('\s20AC') from dual;}}}\n\n!! Dump\n\nTakes a varchar column and some other arguments to see the byte length and actual byes of the string in various bases. See [[this|]] reference page.\n\n! Character Encoding\n\nThis is all determined by the NLS_LANG environment variable.
explain plan for <query>\n\nselect * form plan_table\n\nOR \n\nuse a GUI
* Get the current time stamp: {{{select current_timestamp from dual}}} .\n* There is a notion of the databases timezone {{{SELECT DBTIMEZONE FROM dual}}} which is an offset from UTC.\n* The time zone of the current session can be viewed with: {{{select sessiontimezone from dual}}} . This can be altered by saying: {{{ALTER SESSION SET time_zone = '-7:00'}}} .\n* Current NLS parameters can be viewed with this query: {{{select * from V$NLS_PARAMETERS}}} .\n* From Unix using sqlplus, the current time zone will automatically be picked up from the setting the {{{$TZ}}} environment variable.\n* Timestamp data types:\n** TIMESTAMP - no timezone information\n** TIMESTAMP WITH TIME ZONE - includes the UTC offset\n** TIMESTAMP WITH LOCAL TIME ZONE - everything is stored in the server's local time zone and converted from the current session's timezone.\n\n!References:\n* [[Alter Session|]], Oracle Documentation.\n* [[Datetime Datatypes and Time Zone Support|]], Oracle Documentation. Chapter 4. Oracle® Database SQL Reference 10g Release 1 (10.1) Part Number B10759-01.
<!--{{{-->\n<div class='header'>\n <div class='titleLine'>\n <span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n <span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n </div>\n</div>\n<div id='sidebar'>\n <div id='sidebarSearch' macro='search'></div>\n <div id='mainMenu' refresh='content' tiddler='MainMenu'></div>\n <div id='sidebarOptions' refresh='content' tiddler='KubrickSidebar'></div>\n <div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>\n</div>\n<div id='displayArea'>\n <div id='messageArea'></div>\n <div id='tiddlerDisplay'></div>\n</div>\n<div id='contentFooter'><p>TiddlyWiki was created by <a href=''>Jeremy Ruston</a> and TiddlyKubrick was created by <a href=''>Clint Checketts</a></p></div>\n<!--}}}-->
Speaker is a PostGreSQL core developer who works at sun.\n\nWhen clients say "Our database is slow" they don't know the problem. Presented an application stack consisting fo the application, middleware, database, OS, hardware. When any layer has a performance problem the entire system is harmed. Presented a funnel of the stack where each high level layer maximizes the performance and scalability. At any given time it is only possible to observe and troubleshoot the "largest" mole - produces a whack a mole effect.\n\n!!OS Tools\ncpu performance and utilization - mpstatus\nMemory utilization - free, vmstat\nIO: iostat\n\nBenchmarks vs. Microbenchmarks: micro tests performance in one area, benchmarks test performance in an overall system\n\nMicrobenchmarks: bonnie++ (OS), DB: pgbench, Wisconsin, TPCB, OSDB/PolePosition\nBenchmarks: DBT Benchmarks, DBT3 (DW), pgUnitTest, EAstress, DIY\n\nLess than 10% of Moles cause 90% of performance degradation.\n\n!!Common Types of Moles:\n\n* IO Mole\n* CPU Mole - actually a good place to be for an OLTP application so long as the performance does not suck.\n* Locking Mole - long running transactions, cursors held too long, pessimistic locking, poor transaction management, buffers are too low\n* Application Mole - app and web servers are completely maxed out - not enough application servers\n\nAuthors blog:
Last year 207 patches to the specs, this year 412 patches.\n\nThis talk is only about the language, not implementation.\n\n!New features\n* "Adverbial typing" - namespaces can be more complex to resolve namespace conflicts.\n* inline comments\n* "Unspace" - any whitespace can be escaped with \s\n* No more defaulting to {{{ $_ }}} (the goal is to try to get rid of arbitrary memorization\n** {{{ .=comp }}} (modyifies $_)\n** {{{ .print }}} prints $_\n* min and max are not only list operators but are now infix operators - can be used in {{{ =min }}} and {{{ [min] @value }}}\n* ranges are lazy loaded so you can do things like calculating the squares to infinity {{{ (1..) ** 2 }}}\n* New file test operators\n* a cross meta operator = {{{ X..X }}}\n* Perl 5 {{{ @ARGV }}} == Perl 6 {{{ @*ARGS }}} (globals nolonger pollute the package namespace as they have <sigial>*)\n* main subroutine support. Argument list is whatever is left in {{{@*ARGS}}}. CLI is defined as a normal subroutine as named flags come in as named parameters to main.\n** can overload main (called a multi method in Perl 6) to have other usages.\n* * if nothing matches any of the mains, USAGE is called. If there is no USAGE method it is generated automatically from the mains! Super cool!\n* Nested postfix control statements\n* {{{ each }}} replaces {{{ grep }}} in most places. The mnemonic is that you perform the operation on each element of the list.\n* Explicit parallelism - eager and hyper operators\n* STM (software transactional memory)\n{{{\ncontend {\n maybe { foo() }\n maybe { bar() }\n defer { baz() }\n}\n}}}\n* consistent meta syntax \n* Then Larry when on about regular expressions, and parsing which I don't understand. He mentioned that Perl used NFA's instead of DFA's but I would have to look up what those mean again.\n* Match boundaries - new {{{<(}}} and {{{)>}}}\n* brackets are only valid on the regex side of a substitution\n{{{s[foo] = 'bar'}}}\n* can define fixed length arrays\n* negative indicies no longer count from the end but you can say @array[*-N] - whatever the length is minus N\n* User-defined indicies - pseudo hashes done right. Backround: pseudo hashes were something added to Perl 5 to make objects use arrays while still preserving hash access to objects. The idea seemed great as objects using pseudo hashes were 15% faster than objects using regular old hashes. The problem was that hashes were 15% slower in that version of Perl and previous versions.\n\n! Documentation\n* lists ({{{=item}}} is a lot easier)\n* all of the markup is semantic and not layout\n* can allow certain formatting in verbatim blocks. For example, {{{ =begin code:allow B }}} would allow for bolded code.\n* can {{{=use}}} modules from POD!\n* new standard format for methods\n
An eval{}; called in a destructor clears the value of $@ . Java handles this problem by ignoring exceptions thrown from the destructor, see .\n\nThe bad:\nperl -e'eval { my $test = bless {}, "main"; die "I died" }; print ($@ ? "ok 1 - caught die: $@\sn" : "not ok 1 - no die\sn"); sub DESTROY { eval {}; }'\n\nThe good:\nperl -e'use Error qw(:try); try { my $test = bless {}, "main"; throw Error::Simple("I died"); } catch Error::Simple with { my $e = shift; print "ok 1 - caught error: $e\sn"; exit; }; print "not ok 1 - no error caught\sn"; sub DESTROY{ try { 1 } }'\n\n\nTODO: query the Perl bug database for DESTROY, destructor, or eval. Fails in Perl 5.8.5 and 5.8.8.
It is nice that Java Exceptions take a java.lang.Throwable in their constructor in addition to a string. When the top object is printed, the Throwable (the superclass of Exception) passed in is also printed so that it is possible to not only see where the top level object originated from but also to determine what exception caused the outer exception.\n\nThe Javadoc of java.lang.Throwable states:\n\n"A throwable contains a snapshot of the execution stack of its thread at the time it was created. It can also contain a message string that gives more information about the error. Finally, it can contain a cause: another throwable that caused this throwable to get thrown. The cause facility is new in release 1.4. It is also known as the chained exception facility, as the cause can, itself, have a cause, and so on, leading to a "chain" of exceptions, each caused by another."\n\nAlso Java exceptions provide a getStackTrace methods which provides programmatic access to the call stack.
''Methods can take types:''\n\n{{{\nsub takes_anything(Any $this)\nsub takes_strings(Str $my_string)\n}}}\n\n''New type operator''\n{{{\nif ($this ~~ Hash) # Perl 6\nif (ref $this eq 'HASH') # Perl 5\n}}}\n\n''Modified Ternary Operator''\n{{{ 1 == 2 ?? 'true' ?? 'false'}}}\nThe third Apocalypse explains why.
More information can be found in perlfunc\n\nCall closures with the & syntax. IE:\n\n$var = 1;\nmy $closure = sub { $var + shift };\n&$closure(4); # returns 5
Create a breakpoint wherever:\n\nIn the source code of interest add a:\n$DB::single = 1;\n\nStart up the debugger: \nperl -d program\n\nc throught the program until the break point is found.\n\nh lists common commands.\n\nT is the stacktrace command\n\nperldebtut and perldebug are helpful\n\n''Mod_perl Interactive Debugging''\n\n\n\nMentions [[Martin Fowler's alphabetical list of refactorings|]] which defines refactoring operations.\n\nGUI test running - Test::Unit::TestRunner or ''Test::Unit::TkTestRunner''\n\n"Another interesting possibility is the development of new IDEs or adding to existing ones by using Adam Kennedy's PPI module, which provides the ability to parse Perl documents into a reasonable abstract syntax tree and to manipulate the elements and re-compose the document. There is a new Perl editor project, VIP, that is in the design stages and is intended to be "pluggable" and to have special features to support pair programming."\n\nMentions Perl vim pluggins
DBI_PROFILE=6/DBI::ProfileDumper perl -d:Profile script\n\nProduces two files:\n and prof.out\n\ndbiprof(1) examines and prof.out is human readable.\n\n-d:Profile uses Devel::Profile\nanother profiling module is Devel::DProf\n
Francisco \nThe speaker started with Erland in 1994\n!Misc\n* {{{f().}}} wipes all variable definitions from the shell only\n* Comment character: {{{%}}}\n* atoms are never garbage collected (can cause DoS attacks). list_to_existing_atom() builtin was created to solve this problem\n* Erlang programs are generally not defensive with data validation of internal functions\n** However, external data is heavily validated\n* There is a "Let it crash" approach because it is so distributed.\n* Testing\n** Quickcheck - auto generates random tests - sounds neat\n** eunit\n** Dializer\n\n!Operators\n* "abc" "dev" = "abcdef"\n* List catination: {{{[1,2,3] ++ [3,4,5] = [1,2,3,4,5,6]}}}\n* List subsets use {{{--}}}\n* {{{|}}} is the cons variable for list operations\n* {{{=:=}}} is exactly equal to. Includes type information. {{{1 =:= 1.0.}}} is false\n!Variables\n* Can only be bound once!\n* All types are determined at runtime\n* usually capitalized\n* {{{_}}} is the don't care variable. It is like assigning to a list with undef in it in Perl. {{{_}}} does not bind.\n!Complex Data Structures\n* Can be arbitrarily typed in like in Perl\n* Automatically garbage collected\n!Pattern Matching\n* Assignment\n** {{{ {E, E, foo} = {abc, abc, foo} }}} E = abc and foo = foo\n** {{{ [H|T] = [1,2,3] }}} , H = 1, T = [2,3]\n* Testing\n** {{{ {A,A,B} = {abc, def, 123} }}} This fails because A was rebound to def.\n** {{{ [A,B,C,D] = [1,2,3] }}} This fails because the list assinging to has more elements than the left hand side\n** {{{ [A,B|C] = [1,2,3,4,5,6,7] }}} This succeeds because C gets assigned to the rest of the list\n!Functions\n* Pattern matching works with the signature of the function head.\n* functions can have multiple heads which are like signatures\n* The order of function heads matters\n* If a function head fails to match you get a runtime error\n* clauses are serporated by a semi colin and a full stop (.) is put at the end\n* Calling\n** Module:Function(Arg1,Arg2,...ArgN) but the Module part may be optional\n** It is not a convention to use single quotes in modules or function name (except for machine generated code)\n!Modules\n* Stored in file with .erl suffix. The module name has to be the same as the file name\n* Named with {{{-moudle(name).}}} syntax\n* Functions can be exported with this syntax: {{{-export([Function/Arity, Function/Arity,...]).}}}\n\nI stopped taking as many notes at this point because I installed erlang on my machine.\n\n!If statements\n* else is implemented by putting true in as the last guard\n!Guards\n{{{\nfactorial(N) when N > 0 ->\n N + factorial(N - 1);\nfactorial(0) -> 1.\n}}}\n* The compiler optimizes this\n!Recursion\n* Has nice support for lists in the function heads\n{{{\nmember(H, [H|_]) -> true;\nmember(H, [_|T]) -> member(H,T);\nmember(_, []) -> false.\n}}}\n* This example is tail recursive which erlang makes sure does not use too much memory.\n!Built in Functions\n* date(), time(), length(List), size(Tuple), atom_to_list(Atom), list_to_tuple(List), integer_to_list(2234), tupel_to_list(Tuple)\n* most are implemented in C\n* Types of bif's : process and port handlin, object access and examination, meta programming, type conversions, ...\n* Use BIF's with care as they sort of go around the scheduler\n* Dynamically execute functions by using apply: apply(Module,Function,[Arguments])\n!Parallel Programming\n* Pid2 = spawn(Module, Function, Args).\n* spawn never fails\n** a process either returns normally or abnormally\n* Message Passing\n* Sent using '''Pid! Msg'''\n** The send call with never failed\n* massage is stored in a process mailbox on the receivers side\n* Receive clauses receive messages\n{{{\nreceive\n {reset,Board} -> reset(Board);\n {shut_down,Board} -> {error,unkown_msg}\nend\n}}}\n** If no messages are there we suspend\n* Erlang simply runs out of memory when mailboxes fill up\n** One solution to this is that asynchronous messages are changed to synchronous ones\n* Messages which are not recognized remain in the mailbox\n* Registered Processes\n{{{\nregister(Alias,Pid)\nAlias ! Message\n}}}\n* {{{flush().}}} is a special function which removes all messages from the shell's inbox\n* can apply a timeout to be executed when no messages have been received in x ammount of time {{{receive after 3000 -> true end.}}}\n!Error Handling\n* link(Pid= spawn(Module,Function,Args)) creates a bidirectional link\n** there is also a swan_link function\n** If a process terminates it will send an exit signal to all of its linked processes which will then exit themselves. {'EXIT', <process_name>, Reason}\n* BIF process_flag(trap_exit, true) will convert exit signals to messages and put them in the mailbox\n** denoted with a double line around the circle when you draw out the process diagram\n* exit(Pid,Rason) - sends an exit signal along with a reason\n** If the reason is kill then the process will exit unconditionally\n
OSCON 2008, Monday 7/21, Damian Conway\n\n* General\n** The string function is to vim as Data::Dumper is to Perl.\n** {{{.}}} is the catination operator\n* Lists\n{{{\nlet list = split(str)\n}}}\n** Many other list-related fuctionas are actually procedures which modify the list in place\n** {{{call insert(list, newval)}}}\n** there area aslo add, remove, and filter procedures\n*** the filter function actually modifies the list in place\n*** {{{v:val}}} is to vim as {{{$_}}} is to Perl\n** sort, reverse, and map also change the list in place\n** fortunately each of these functions return the new list, but keep in mind that each passed in list is modified!\n* Dictionaries\n** uses curley braces to declare\n** accessed using square brackets but give it a string instead of an integer\n** exceptions are thrown if you access a key which is not there unless you use the get function.\n** Can also access with the dot notation\n*** of course this is how vim does records or structs\n{{{\nlet user = {}\nlet = 'Damian'\nlet user.acct = 123456\n\necho user\n}}}\n*** and (surprise surprise) you can assign funtion references to values to have a primitive object\n** pretty much everything is the same as lists\n*** can copy and deepcopy\n*** Operators {{{is}}}: same place in memory, {{{==}}} recursive equals check\n** two dictionaries can be merged with the extends function\n* Functions\n** use the function declarator\n** Example\n{{{\nfunction SaveBackup ()\n blah blah blah\nendfunction\n}}}\n** scope\n*** start with upper case as built in functions use lower case\n*** you can also prefix the name with s: so that it is scoped to the current script\n*** Declaring with {{{function!}}} overwrites any other function with this name\n** If you don't want the return value you have to use keyword {{{call}}}\n** {{{:.,+9call Function()}}} - calls the function 10 times (one per line)\n** Can also write a function to anticipate being called with a rnage with keyword range. This populates a:firstline and a:lastline\n** Helpful for the RHS of a mapping\n** when referring to a parameter you need to say a: for argument\n** {{{a:000}}} is to vim as {{{@_}}} is to Perl\n** {{{a:0}}} is the number of parameters which were passed in\n** {{{...}}} in the signature accepts any other arguments\n** can take a reference/pointer to a function using the {{{function()}}} function\n** vim does not have closures\n** the {{{call()}}} function is not the same as the {{{:call}}} keyword\n*** call() invokes a function reference\n*** :call calls a function and discards the results\n*** there are times when you need to say {{{call call(function)}}}, oh my!\n* Regexes\n** just strings\n** as powerful as Perl 5.8 regexes but not as powerful as 5.10\n** Example: {{{imap <TAB> <C-N>}}} which actually tabs in the first column\n{{{\nfunction! TabOrCompletion()\n let col = col('.') - 1\n if col=0 || getline('.')[col - 1] !~ '\sk'\n return "\s<TAB>"\n else\n return "\s<C-N>"\n endif\nendfunction\n\n:inoremap <expr> <TAB> TabOrCompletion()\n}}}\nUse inoremap so it does not call itself recursively. <expr> evaluates what is returned\n*** Has an XML auto close method\n* Exceptions\n{{{\ntry\n commands\ncatch /pattern to match expression/\n hanle excetpion here\nfinal\n always executed\nendtry\n}}}\n** all builtin exceptions start with Vim\n** v:exception has the exception and v:throwpoint has helpful stuff\n** catch without a pattern catches anything\n** :throw throws an exception (give it a string or a number)\n* Debugging\n** :help debug-scripts\n** More annoying that the Perl builtin debugger\n** invoke {{{:debug call MyFunc()}}}\n** {{{vim -D somefile}}} - used to debug your .vimrc\n** It usually defaults to the file you are editing not the one you are debugging\n** Colon commands: cont, step, next , interrupt and quit\n** breakpoints\n{{{\n:breakadd func MyFunc\n:breakadd func 10 MyFunc 'stop at the 10th line of MyFunc\n:breakadd file 42 ~/.vimrc\n:breaklist 'list all breakpoints\n:breakdel * ' deletes all breakpoints\n}}}\n** Damian wrote a pluggin to create better breaks\n*** He uses this to set breakpoints from within his scripts\n* Autocommands\n** Vim is event driven\n** {{{:autocmd <eventtype> <pattern> <command>}}}\n*** the pattern matches the file's extention\n** list with :autocmd\n** Can set up an autocmd so that when you leave insert mode it runs your pretty printer\n** Example for creating a new file\n{{{\nautocmd BuffNewFile *.pl @r ~/templates/\nautocmd FufNewFile *.p[lm] call BuildFileTemplate(<a:newfile>)\n}}}\n** Set a timeout to lock you out automatically\n{{{\nset updatetime=30000\n:autocmd CursorHold * !lock -p\n}}}\n*** autocmd! deletes all autocmd's\n*** {{{autocmd! * *.py}}} removes all .py file auto commands\n** be careful about autocmd duplication\n** augroup can declare grouped autocommands\n* Using embeded languages\n** :perl and the rest of the line is a tiny perl one liner\n*** you can add backslashes to make it not line line\n*** there is a multiline version with herediocs\n{{{\nperl <<END_PERL\n blah\n blah\nEND_PERL\n}}}\n*** Can next Perl from Vim from Perl by doing {{{Vim::Eval()}}}\n*** {{{:perldo}}} is a special command which accepts a range\n{{{\n:nmap ;r :,.$perldo $_ = reverse $_<CR>\n}}}\n** Python\n*** :python command and here docs\n*** :pyfile ~/pythong/ - finds the script and executes it\n*** no python do but you can simulate it by putting a range in from of the :python command\n*** The python API is much cleaner but less convenient\n*** Python rebuilds standard out to go to the error message place\n** There are scheme, tcl, and ruby interfaces however they are not as far along as python and perl\n
''Essential Project Mangement Features''\n\n * Granular Task ''Duration'' - The duration of a task should be as small as one hour. The smaller the durations of the task, the more accurate the time estimate.\n * Task ''Notes'' - Tasks should have a notes field\s\n * Simple ''Reporting'' - Reports can be run on the project. Examples would be total man hours for the project, and total incomplete man hours.\n * Cross ''Platform'' - Works on Windows and OSX.\n\n||Duration|Notes|Reporting|Platform|Price/Licence|Comments|\n|MS Project|Y|Y|Y|N|expensive||\n|SharedPlan Pro|N|N|Y|Y|$139|Limited Reporting|\n|GanntProject|N|Y|N|Y|open source|Has Perl support for reading data file.|
PythonModules\n[[Introduction To Python]]\n\n* Has an interactive shell with a help functions.\n* pydoc is the documentation command.\n* Built in functions have __name__ format.\n* has good documentation\n* Python dictionary is implemented well and is talked about in the book "Beautiful Code."\n\n!Type System\n* Does not have type coersion unline perl. Cannot do {{{1 + 'hi'}}} .\n** You would cast like this {{{str(1) + 'hi'}}} or {{{'h1' * 3}}}\n** {{{type()}}} function provides types.\n** Types can change with assignment.\n* {{{dir()}}} function when passed an object will display all methods on that object.\n* everything is an object\n* Basic types: integers, floats, bools (True, False), strings, none (null)\n\n!Operators\n* is - identity\n* == - an object's values are equal but they live in two different places in memory\n\n!Strings\n* immutable like in Java\n* how to get substrings\n{{{\na = 'hello'\na[0] = 'h'\na[1:3] = 'el'\na[1:] = 'ello'\na[:] makes a copy\n}}}\n* Cannot assign with the above syntax because they are not mutable.\n* There is a printf function\n{{{ '%d doughnuts, %s' % (3, 'please')}}\n'3 doughnuts, please'\n\n!Comments\n* Multi line, {{{'''\sn\sn'''}}} - can be other characters but they have to match\n* inline: #\n\n!Lists and iteration\n* zero based\n* Arbitrarily nestable\n* {{{l = [1, 2, 3, 4]}}}\n* iteration\n{{{\nfor x in list:\n print x\n}}}\n* x maintains its scope outside of the loop holding the last value.\n* {{{if 3 in list: print blah}}}\n** returns true if three is in the list\n* {{{l = range(100)}}} - returns a list of 0 - 99 . xrange is more efficient.\n* List Comprehensions\n** {{{ [str{x) for x in l if 0 ==x % 2] - returns the list of evens as strings - like grep in Perl\n*** the if and str() are completely optional\n** there are dictionary comprehensions\n\n!Dictionaries\n* Like hashes in Perl\n* {{{ d = {} }}}\n* type = dict\n* {{{ d = {'1':1, '2': 'two', 3: ['hi', 'there']} }}}\n* retrieval: {{{ d['1'] }}}\n* functions keys, values, items are like what you would expect.\n{{{\nfor k,v in d.values():\n print k, v # comma sticks a space between them\n}}}\n\n!Tuples\n* immutable lists\n* More commonly use as structs.\n* Declaration: {{{t = (1, 2, 3, 4)}}}\n* Use usually list retrieval and slices\n\n!Functions\n{{{\ndef Say(s):\n print s\n}}}\n* type checking for functions is not usually done\n* Keyword arguments:\n{{{def Say(s, times=1)\n print s * times}}}\n** must be after positional arguments\n* you have to put something in a block so you use pass (reserved word) as a no op\n* Recommended using {{{sorted}}}\n** don't have to use custom comparators.\n** key argument allows a passed in a function, you can do it inline with lambda\n*** {{{ sortedl, key=lambda x: x.lower())}}}\n\n!Misc\n* if __name__ == '__main__': main() - like Perl it executes statements in the file. This is like the main namespace.\n* You can see what file on disk was used to declare pretty much everything.\n* else if is elif
* import is the keyword for using modules\n* Python stores the interpreted bytecode in .pyc files. There are also .pyo files for opimized bytecode.\n* {{{from x.y import aa }}} will put aa in your namespace\n* Directory structure creates namespaces which are seporated by spaces with '.'\n\n!Classes\n{{{\nclass Foo(object): # object is the root of the inheritance hierarchy\n def __init__(self, arg, kwarg=None): # constructor\n self.arg = arg\n self.kwarg = kwarg\n def Say(self):\n print self.arg\n}}}\n* "We are all adults here." - there is no support for public, vs, private, protected. Convention is public variables declared as normal, protected has a leading underscore, private has two leading underscores.\n* Allows for multiple inheritance\n* No interfaces\n* Inheritance example:\n{{{\nclass Bar(Foo):\n def Say(self):\n print self.kwarg\n}}}
Documentation for all installed ruby gems can be found by starting 'gem_server' from the command line and then going to: http://localhost:8808/\n\nMore documentation is available in /usr/local/lib/ruby/gems/1.8/doc. For example, here is [[actionpack|file:///usr/local/lib/ruby/gems/1.8/doc/actionpack-1.9.1/rdoc/index.html]].\n\nSee [[Ruby]] for Ruby language documentation.\n\n!2010-08 Notes\n\n{{{ruby script/generate --help}}}\n **metal - bare metal code minus ORM and view overhead. Used by Sinatra.\n **observer - message passing and the like\n\n
''Sept 2005''\nPerlNeedsBetterTools
This script will recurse through INC of the package passed in:\n\n/*{{{*/\n#!/usr/bin/perl\n\n# recurse through ISA to generate the inheritance hierarchy of a class\n\neval "require $ARGV[0]" or die "Cannot find package $ARGV[0]";\nisa($ARGV[0],0);\n\nsub isa {\n my ($class, $depth) = @_;\n print "\st" x $depth, "$class\sn";\n my @classes = eval "\s@${class}::ISA";\n\n return unless @classes; # exit out of recursion\n\n map { isa($_, $depth + 1) } @classes;\n}\n/*}}}*/
From [[wikipedia|]]
[[Off line documentation|file:///Users/ryan/doc/ruby-doc-bundle/index.html]]\n\nSee also, [[Rails]].
That is me!
Sun Certified Java Programmer
Other "next generation" SCM's bzr/git/hg/darcs
[[Scalar Sub Selects|file:///Users/ryan/manual-split/manual_SQL_Syntax.html#Scalar_subqueries]] can be used anywhere a column or scalar value is used in a query. One helpful application is to use a table's count in every row of a query result. For exmpale, if a query calculated an aggregated occurance of a condition say in a group by, this total could be divided by all elements in the table to calculate the percentage of the occurance.\n\nExample:\n\nSELECT count(*) as total, total / (SELECT count(*) FROM t1) * 100 as percentage\nFROM t1\nGROUP by some_colum\nWHERE another_column = 'some condition'
!Misc\n* Yahoo has a grade sheet of supported browsers\n!Browser Bug Fixes\n* Don't assume that the browser always has the bug\n* A remedy to this problem is Feature Simulation\n** more advanced than object detection\n** basically write code to simulate the bug\n** An alternative to browser detection
''Features Selenium Needs''\n\n * the ability to compare abitrary xpath results like assertEquals(count(//a[text() = 'edit'), 3)
my notebook for all things computer and internet\n[[About This Wiki]]
Ryan's Wiki
AFIK, there are only three types of joins:\n\n1) ''INNER JOIN'' - returns all rows from both tables where there is a match\n2) ''LEFT JOIN'' - returns all the rows from the first table (the first one since English and SQL are written left to right), even if there are no matches in the second table.\n3) ''RIGHT JOIN'' - returns all the rows from the second table, even if there are no matches in the first table.\n\nIt is possible to write ''[LEFT|RIGHT] OUTER JOIN''. This is the same as [LEFT|RIGHT] JOIN. The OUTER is provided as syntactic sugur to differentiate it from an INNER JOIN. This is confusing because there is no such thing as a [LEFT|RIGHT] INNER JOIN.\n\nMore information is available at .\n\n[[MySQL JOIN Syntax|]]
/***\n\n\n!General Rules\n***/\n/*{{{*/\na,\n.button{\n color: #06c;\n text-decoration: none;\n background: transparent;\n}\n\na:hover,\n.button:hover{\n background: transparent;\n text-decoration: underline;\n color: #147;\n}\n\nbody {\n font-size: 62.5%; /* Resets 1em to 10px */\n font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;\n background-color: #d5d6d7;\n color: #666;\n background: #e7e7e7;\n margin: 0 auto;\n}\n\n#contentWrapper{\n background: transparent url("kubrickbg.jpg") repeat-y 0px 0px;\n border: 0;\n margin: 0 auto;\n width: 760px;\n}\n\n/*}}}*/\n/***\n!Header Rules\n***/\n/*{{{*/\n.titleLine{\n margin: 80px auto 0em;\n padding: 0;\n width: 745px;\n text-align: center;\n color: #fff;\n}\n\n.siteTitle{\n font-weight: bold;\n}\n\n.siteTitle a, .siteSubtitle a{\n color: #fff;\n}\n\n.siteTitle a:hover, .siteSubtitle a:hover{\n text-decoration: underline;\n}\n\n.siteSubtitle{\n display: block;\n margin: .5em auto 1em;\n}\n\n.header {\n background: url("kubrickheader.jpg") no-repeat bottom center; \n margin: 0;\n padding: 1px;\n height: 198px;\n width: 758px;\n\n}\n/*}}}*/\n/***\n!Footer Styles\n***/\n/*{{{*/\n#contentFooter {\n text-align: center;\n clear: both;\n background: url("kubrickfooter.jpg") no-repeat bottom;\n border: none;\n padding: 2em;\n height: 3em;\n}\n/*}}}*/\n\n\n/***\n!Sidebar styles /% ============================================== %/\n***/\n/*{{{*/\n#sidebar{\n margin: 1em 2em 0 0;\n position: static;\n float: right;\n}\n\n#sidebar a,\n#sidebar a:hover{\n border: 0;\n}\n\n#sidebar h1{\n font-size: 1.4em;\n font-weight: bold;\n margin: 0;\n background: transparent;\n color: #000;\n}\n\n#sidebar ul{\n padding: 0;\n margin: 0 0 0 1em;\n}\n\n#sidebar li{\n list-style: none;\n}\n\n#sidebar li:before{\n color: #000;\n content: "\s00BB \s0020";\n}\n\n#sidebar, #mainMenu, #sideBarOptions{\n width: 200px;\n text-align: left;\n}\n\n#mainMenu{\n position: static;\n}\n/*}}}*/\n/***\n!Sidebar search styles /% ======================================== %/\n***/\n/*{{{*/\n#sidebarSearch{\n margin: 0 0 0 10px;\n width: 145px;\n}\n\n#sidebarSearch input{\n font-size: .9em;\n width: 100px;\n}\n\n#sidebarSearch .button{\n float: right;\n margin-top: 1px;\n}\n/*}}}*/\n/***\n!Sidebar option styles\n***/\n/*{{{*/\n#sidebarOptions{\n margin-left: .75em;\n}\n\n#sidebarOptions h1{\n font-size: 1.3em;\n}\n\n#sidebarOptions a{\n display: inline;\n border: 0;\n}\n\n#sidebarOptions .sliderPanel{\n background-color: transparent;\n font-size: 1em;\n margin: 0;\n}\n\n#sidebarOptions .sliderPanel a:before,\n#sidebarTabs li:before{\n content: "";\n}\n/*}}}*/\n/***\n!Sidebar tab styles\n***/\n/*{{{*/\n\n#sidebarTabs .tab,\n#sidebarTabs .tab:hover{\n border: 1px solid #ccc;\n text-decoration: none;\n}\n\n#sidebarTabs .tabSelected{\n background: #ccc;\n color: #333;\n}\n\n#sidebarTabs .tabUnselected{\n background: #e6e6e6;\n color: #333;\n}\n\n#sidebarTabs .tabContents{\n background: #ccc;\n color: #333;\n border: 1px solid #ccc;\n width: 95%;\n}\n\n#sidebarTabs .tabContents a{\n color: #06c;\n}\n\n#sidebarTabs .tabContents a:hover{\n color: #147;\n\n}\n\n#sidebarTabs a.tabSelected:hover{\n cursor: default;\n}\n\n#sidebarTabs .txtMoreTab .tab{\n border: 1px solid #aaa;\n color: #333;\n}\n\n#sidebarTabs .txtMoreTab .tabSelected{\n background: #aaa;\n color: #333;\n}\n\n#sidebarTabs .txtMoreTab .tabSelected:hover{\n background: #aaa;\n color: #333\n}\n\n#sidebarTabs .txtMoreTab .tabUnselected{\n background: #ccc;\n color: #333;\n}\n\n#contentWrapper #sidebar .txtMoreTab .tabUnselected:hover,#contentWrapper #displayArea .txtMoreTab .tabUnselected:hover{\n color: #333;\n}\n\n#contentWrapper .txtMoreTab .tabContents{\n background: #aaa;\n color: #333;\n border: 1px solid #aaa;\n}\n/*}}}*/\n/***\n!Message area styles /% ========================================== %/\n***/\n/*{{{*/\n#messageArea {\nbackground-color: #eee;\n border: 1px solid #ccc;\n color: #bbb;\n margin: 0 1em;\n font-size: .8em;\n}\n\n#messageArea a:link{\n color: #aaa;\n}\n#messageArea a:hover{\n color: #06c;\n}\n\n#messageArea .messageToolbar .button{\n border: 1px solid #ccc;\n color: #aaa;\n text-decoration: none;\n}\n#messageArea .messageToolbar .button:hover{\n border: 1px solid #777;\n color: #777;\n}\n/*}}}*/\n/***\n!Popup styles /% ================================================ %/\n***/\n/*{{{*/\n#popup{\n padding: 0;\n background: #eee;\n border: 1px solid #ccc;\n color: #333;\n}\n\n#popup a{\n color: #06c;\n font-weight: normal;\n}\n\n#popup a:hover{\n color: #fff;\n background: #aaa;\n text-decoration: none;\n}\n/*}}}*/\n/***\n!Tiddler display styles /% ====================================== %/\n***/\n/*{{{*/\n#displayArea{\n margin: 1em 18em 1em 1em;\n text-align: left;\n font-size: 1.2em;\n}\n\nh1, h2, h3, h4, h5, .title{\n font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;\ncolor: #333;\npadding: 0;\n}\n\n.viewer h1,.viewer h2,.viewer h3,.viewer h4,.viewer h5,.viewer h6{\n background: transparent;\n border-bottom: 1px dotted #ccc;\n}\n\n.title{\n font-size: 1.6em; \n}\n\n.subtitle{\n color: #777;\n font-size: .9em;\n}\n\n.toolbar{\n font-size: .8em;\n}\n\n.toolbar a:link,.toolbar a:visited{\n background: #e6e6e6;\n border: 1px solid #ccc;\n color: #aaa;\n padding: 1px 3px;\n margin: 0 .5em 0 0;\n}\n\n.toolbar a.button:hover{\n background: #ccc;\n border-color: #bbb;\n color: #06c;\n text-decoration: none;\n}\n\n.viewer a.tiddlyLinkNonExisting:link{\n color: #b85b5a;\n font-style: normal;\n}\n\n.viewer a.tiddlyLinkNonExisting:hover{\n text-decoration: underline; \n}\n\n.viewer a.tiddlyLinkExisting:link,#displayArea .viewer a.externalLink{\n font-weight: normal;\n color: #06c;\n}\n\n.viewer a.tiddlyLinkExisting:hover,.viewer a.externalLink:hover{\n color: #147;\n text-decoration: underline; \n}\n\n.viewer .button{\n border: 0;\n}\n\n.editor {\n font-size: 8pt;\n color: #402c74;\n font-weight: normal;\n}\n\n.editor input, .editor textarea {\n display: block;\n font: 11px/110% "Andale Mono", "Monaco", "Lucida Console", "Courier New", monospace;\n margin: 0 0 10px 0;\n border: 1px inset #333;\n padding: 2px 0;\n}\n\n.footer, .footer a.button,.editorFooter, .footer a.button{\n color: #aaa;\n}\n\n.selected .footer,.selected .footer a{\n color: #777;\n}\n\n.selected .footer a.button,.selected .editorFooter a.button{\n color: #06c;\n}\n\n.footer a.button:hover,.editorFooter a.button:hover{\n color: #147;\n background: transparent;\n} \n\n.tagClear{\n clear: none; \n}\n/*}}}*/
[[MySQL manual reference|file:///Users/ryan/manual-split/manual_SQL_Syntax.html#Subqueries]]\n\nScalarSubSelects
~YouTube's early days: web boxes do everything. Written in Python.\n\n~YouTube consisted of about two back end engineers and two front end engineers up until Google bought them. Day on day growth could be 50%! General advice is to minimize dependencies by focusing only on data in and data out. Accept some latency so you can continue to expand. ''Localize failures - your site is only down if people think you are down.'' They would do maintenance on the master DB and it only really effects 1 - 2 % of the application. Disjoint tasks should run on different machines to get the most out of each machine.\n\nMoved from mod_phython to mod_fastcgi to save RAM. With mod_python - each child was also about 60 MB. They used about 250 apache processes but only 8 fastcgi processes. Made search a remote service running on separate machines. This way the index can be stored in memory - they are using a modified Lucence. Encode a portion of the call stack as a SQL query comment to track down where the queries are coming from. YouTube is using memcached as well. Item lookups are the easiest to cache. They modified the Python bindings to be able to determine the cached rate.\n\n!Software Optimization\n\nFast vs. fast enough. Strive for machine efficiency - don't obsess. The largest processing time is waiting on network sockets. Be scientific - collect data and understand it. He mentioned HotShot ( as a tool for profiling. Redid pure python HMAC (encryption) by writing a few lines of C. psyco is a specializing compiler for Python. It has problem with context switching and therefor closures.\n\n!Reasonable Efficiency\n\nEventually you can't optimize one master database server. Pretty much have to go horizontal (at least with MySQL). Need to observe the data access patterns. What queries do you run most often? Do you have joins? Do you need transaction consistency? Why? Does an entity emerge (in YouTubes case this was a user)?\n\nThey partitioned by entity and support transactions within an entity. Allows joins across properties of an entity. Entities are migratory. Cross entity is more complicated - change the way the website works to avoid this! A lot of the YouTube staff used to work at PayPall.\n\nUsed an database layer called EMD which is not an ORM. Connection and transaction management. Lookup service. Query factory. Minimalist table abstractions. Believes that ORMs are evil because you should be able to have transparency into your DB in order to scale. Use multiple inheritance and decorators. All of the scale aware code is nicely opaque to application developers. Base use cases are painless.\n\n!!Bulk Entity Migration\n\n* hijacked mysql binlog to partition on the fly while the live site was running. All DML gets tagged with an entity id! Read the master binlog and selectivly replay it into a new set of mini-masters. Have a small downtime to flush the lookup service while putting the site in read only mode. This conversion was actually done on 4/21.\n\n!Recurring Themes\n* the elegance of simplicity\n* take reliable open software and customize it - a site like YouTube can crush it\n* DIY - filling a ticket for a bugfix doesn't guarantee a fix - fix it yourself!\n\nThe first nine developers all knew each other for about 5 years coming from PayPal.\n\nLitey was mentioned as a replacement for Squid. I am not sure how it is actually spelled.\n
''Data::Dumper from within a template''\n\n''Update''\n\nAn easier way is to use: [[Template::Plugin::Stash|]]\n\nIn template:\n\n[% PERL %]\nuse Data::Dumper;\nprint '<pre>', Dumper($context->stash()->get('variable_name')), '</pre>';\n[% END %]\n\nAnything executing in a [% PERL %] block resides in the Template::Context module. Variable $context is available for all access to the templatge environment. In the above example, the template variable ''variable_name' is Dumped.\n\nThis only works when { EVAL_PERL => 1 } is passed to the Template constructor.
!!Links\n* [[google|]] - [[ ]] surround link. First comes link text, |, and URL.\n* ~WikiWords are escaped with a ~\n\n!!Formatting\n\n''Bold'' - double single quotes\n//Italics// - double forward slashes\n\n!!Tables\nHeaders are denoted by a !\n|!header|!header2|\n|a|b|row 1|\n|c|d|row 2|\n\n!!Bullets\n* One asterisk per bullet\n** two asterisks for a sub point\n*** three asterisks for a sub sub point and so on...\n\n!!Reference\nsee function setupRegexp()
Presenters - two guys from Intel\n\n* P = the number of cores\n* Defined speedup\n* Often a waste of time to linearlize a linear problem because the processor will out pace the IO\n* Amdal's law basically states that the best speedup is about five\n* Gustafson/Barsis Formulae - said that parallelism is worth it essentially\n* sublinear speedup is normal - the square root of P is break even\n* PRAM = Parallel Random Access Machine - can access any location in the same amount of time - silly like a frictionless plain\n* Thread startup and shutdown can be expensive. It is best to be using a thread pool\n* Some OS's have nonscaling memory allocators (actually lock around malloc and free)\n* Stressed that any serial operation should be minimized\n** Code should be used to create threads from other threads\n** Example packages are OpenMP, Intel Threading Building Blocks and Silk\n* Grain Size - chunk of work to execute serially\n** Too fine = schedule overhead dominates\n** too course = loose potential parallelism\n* Contention\n** the author has found that the memory bandwidth is usually a problem when programs don't speed up\n*** A quick and dirty way to test this is to increase the size of the basic data type and see how that effects things. IE, changing and into to a char or long\n* Shared memory is really message passing (if shared memory is done correctly)\n* Don't blame the lock (mutex) if the program does not scale!\n** Workarounds\n*** keep private copies of writable data and merge later\n*** Another option is finer grain locking\n* Locality\n** Compute on data that is near, not far\n** structure computation to avoid cached misses\n** Consider blocking algorithm to improve cache locality (break up an algorithm to threads work on only a portion of the data)\n*** Example: Sieve of Eratosthenes for Finding Primes\n**** Break array into blocks of size sqrt(N)\n* Intel Threading Building Blocks (TBB) Overview\n** Lambda expressions have been added to some C++ implementations, including the Intel compiler. This is also on gcc's roadmap.\n** TBB is really intended for processor parallelism which is much different than IO parallelism.\n** Available in GPL and commercial licenses\n
*Finding information about process and files:\n** What files and sockets are used by a process - use ''lsof''. Running as root gives all process information.\n** What process have a file open - use ''fuser'' (not sure about Darwin equivelent).\n* time\n** To automatically update the date from a time server: ''rdate -s''\n** {{{tzset}}} is a program to correct set the TZ shell variable for your local time zone.\n* Semephores\n** {{{ipcs}}} command\n* Versions\n** Redhat: {{{/etc/redhat-relase}}}\n** Ubuntu: {{{/etc/issue}}}\n\n!Package Management\n* [[apt]]\n* [[yum and rpm]]
''Unix Command -> DOS command''\nThis is assuming the Bourne shell on Unix.\n{{{\nclear -> cls\ncat -> type\nexport VAR=value -> set VAR=value\necho $VAR -> echo %VAR%\n}}}
Automatically fold based on indent:\n\n:set foldmethod=indent\n\nThen unfold under cursor by 'zo' or 'zO' for recursive.
{{{bufdo %s/foo/foo/gec}}} does a substitution in all buffers\n{{{:ls}}} lists all buffers\n\n\n
Record a series of repetative commands into a register:\n\nqa # records into register a\ndo some stuff in vim\nq # stop the recording\n\n@a # redo the commands just recorded in register a
Note: I got to this talk later\n* Slides -\n* Author was from linked in\n* Linked in's main web app is in Java but then there are side things in Grails\n* Da Vinci Project is Sun's name for the project to make the JVM faster\n!Flex\n* Flex rails integration\n** Flex Scaffold:\n** Flex e-Genial Scaffold:\n* There is now back button support in Flex but it is now ignored\n* Flex supports REST easily and also supports cross domain communication (unlike GWT)\n* No zero turnaround w/o IDE\n!GWT\n* http;//\n* JSONRequest can do GETs outside your domain\n* Uses Server-side RPC\n* Pros\n** writes Java => Produces JavaScript\n** Uses standard Java tools\n** There is another framework called Wicked which is more like Spring programming\n* Cons\n** Hard to attache GWT on top of existing code\n* !Flex vs. GWT - really AJAX vs. Flex\n* had lots of interesting charts and graphs from and Google trends
!2008-07-21 OSCON 2008\n[[OSCON 2008 Notes]]\n\n!2008-06-17 YAPC::NA 2008\n[[YAPC::NA2008 Session Notes]]\n\n!2008-06-13 - Python\nI attended my first Python training today. Today is a good day to add a [[Python]] link under the Languages section of the main navigation :)\n\nWhatsOld
!2008-04-29 - YAPC::NA 2008 Call for Voluneteers\n\n[img[YAPC::NA 2008 - "I'm Volunteering"|][]]\n\nIf you would like to volunteer for YAPC (Yet Another Perl Conference) in Chicago please let me know as I am coordinating the volunteers this year. My contact information is on the [[About This Wiki]] page.\n\nMore banners are available from . A special thanks to Kelly Knight for creating the badge banners!\n\n!2008-03-07 - Java\n\nI am doing more Java Development than usual. The following tiddlers will be Java related for a while.
Here are some of my notes from talks I attended.\n\n[[YAPC::NA2008_Moose]]\n[[YAPC::NA2008_TimeZones]]\n[[YAPC::NA2008_Sub::Exporter]]\n[[YAPC::NA2008_MovableType for Open Source Developers]]
Stevan Little\n* Stable - used in production for two years\n* Not a toy - it has been built for production\n* Post Modern Object System\n* Moose is an amplifier for the Perl 5 00\n** still uses blessed hashes\n* {{{Class::Accessor}}} annoyances\n** requires inheritance\n** a simple accessors without defaults\n* Usage {{{use Moose}}}\n** populates current namespace with ''keywords''\n** use base is done with {{{class_type}}}\n* Moose Provides:\n** read/write information and defaults\n** introspection\n** can enforce that attributes are set in a constructor\n** lazy initialization\n** type coercion\n** type enforcement\n** overriding attributes\n** methods in one class can automatically delegate to a method of another class\n* There is a module called Mouse which does the simple stuff and is faster.\n* Moose Performance - Isn't Moose slow?\n** mostly compile time overhead\n** The immutable attribute helps speed. This generates code and then evals it into your package.\n** have sped things up with XS\n** A lot fo the time is spent in Class::MOP\n** Can compile Moose down to a .pmc object\n** Moose on 5.10 was 25% faster than Perl 5.8. Probably due to method call overhead reduction.\n** But it is really designed for developer velocity\n* Use the New York times profiler!\n* Extensions:\n** MooseX::AttributeHelpers\n*** can perform named standard array operations on an array attribute\n*** after attributes get called after an attribute is modified. This can help with referential integrity. This was stolen from the language CLOS. There are also before, after, and around attributes.\n** MooseX::AttributeChecking\n* Moose::Role\n** One usage: an interface:\n{{{\npackage Salaried;\nuse Moose::Role;\nrequires 'paycheck_ammount';\n}}}\n(assuming you created a Salaried::Yearly class which divided out the paycheck amount) in the using class:\n{{{\npackage Employee;\nextends 'Person';\nwith 'Salaried::Yearly';\n...\n}}}\n** Roles are like Ruby mixins but safer.\n** Horizontal reuse\n* Benefits of Moose\n** Lack of tedium\n** shorter\n** less code means less bugs\n** less low level testing\n** code is more descriptive\n* Downsides\n** performance\n*** compile time costs\n*** coercion is slow\n** a lot of Kool-aid (it changes a lot)\n** sometimes it does not play well with others - like AUTOLOAD\n*** used not not work with globref objects like the IO;: objects. This has been fixid with the Moose globref module
Timothy Appnel\n\n* Timothy owns a consultancy which helps companies with MT\n* MT is used by some high profile sites like Huffington Post\n* History\n** Was released in Oct. of 2001 and was an early blogging tool\n** At that time blogger was having uptime issues and it was hosted\n** Shared hosting was more expensive with less options. For that reason, the first versions were only CGI and BerklyDB\n** There was a business blunder when 3.0 was released. They didn't release the license and pricing model until after it was released.\n** However, the professionals market continued to grow.\n* Biggest competitor is WordPress\n* Is currently GPL'd\n* CMS and asset management featers have been added. (not just a blogging tool)\n* MT Myths\n** "MY may be open source but Six Apart may take it back ''again''." - people don't really understand the GPL. And it was always closed source before it was GPL'd.\n** "MT is only free if I'm not doing anything commercial." Again, it is GPL'd. You can buy a support contract from Six Apart.
Ricardo Signes\n\n* Explained dark magic in\n* String::Truncate is helpful - I can't believe I wrote these myself :)\n* Sub::Exporter\n** replacement for Exporter\n** provides common use cases like {{{use MyExportingModule qw(-all)}}}\n** allows for the user to rename subs which would be exported. This helps with collisions.\n*** less ugly than Exporter::Renaming and does not rely on the client\n** allows for exported routines to be easily overridden\n** parameters can be passed into exported routines\n\n
Kevin Falzone - Best Practical\n\n* The Olsen file is a database a timezones\n** contains crazy things like the days which did not exists in Alaska in the 19th century when it was sold to the US from Russia which used the Julian callendar.\n* there are half and quarter hour time zones.\n* China is in all of one timezeone\n* DateTime is your friend!\n* Databases:\n** keep datetimes in GMT!\n* The floating timezone is a meta timezone in which 11 AM is at 11 AM in any timezone.\n* DateTime::Format::Natural is a good module\n* Be ware of DateTime dieing with invalid dates. You can also convert your code to UTC, do the calculation and then convert back to the local time.
Ryan Gerry
* {{{apt-show-versions}}} will display all installed packages and their current versions.\n* {{{dpkg-query}}} - query packages like {{{rpm -q}}}\n** Example {{{dpkg-query --listfiles vim-rails}}} - list all files not including generated config files which are part of the package.
Type the text for 'New Tiddler'
{{{find}}} allows for complex logical expressions. The following example prunes .svn directories and prints out the names of regular files. The parenthesis are redundant but make things more readable.\n\n{{{ \nfind . \s( -name '.svn' -prune \s) -or \s( -type f -and -print \s)\n}}}
Commands\n \n* /invite <username> - how to invite someone to a room\n* /join <channel> - join the channel name\n* /list - shows the cannels on the server, this can take a long time on large servers\n* /scan - shows who is in a channel\n* /who - more user info\n* /me <something> - refer to yourself in the third person\n* /part <channel> [leaving message] - leave the cannel with an optional message\n* /query <nick> - start a conversation with just that person, use /query with nothing after it to leave
Quickly and easily transfer a file. Much more can also be done with this utility.\n\nServer sends file ntv001.mp4:\nnc -v -w 3000 -p 5600 -l < ntv001.mp4\n\n-v = verbose\n-w wait 3000 seconds for a connection\n-p listen on port 5600\n-l listen on all available interfaces\n\nclient does something like:\nnc -v -w 2 5600 > ntv001.mp4\nwhere is the address of the server
\nUsefull rsync options\n\n-a = archive mode\n-P = show progress\n\nOver ssh:
!Commit a file as a different user\n{{{svn --username <username> --no-auth-cache ci <filename>}}}
UsefullVimFolds\n\nVimRecording (q to record)\n\nVimBuffers
!rpm\n* {{{rpm -qa}}} - shows all installed packages\n\n!yum\n* {{{yum clean all}}} - clear out local cache\n* {{{yum grouplist}}} - see what is available\n* {{{yum -y groupupdate <some package>}}} - upgrades the chosen package\n* {{{/etc/yum.conf}}} - global configuration file. Lists what repositories to get rpm's from.