Monday·30·January·2006
MySQL in-depth: Architecture Type Questions
- What is the lost update problem and how does MySQL solve it?
- What is a deadlock? Does it happen with a SQL approach to the lost update problem?
- How can you solve it without logical units of work?
- Discuss relation normalization and denormalization
- What is a primary key and for InnoDB tables discuss how the physical ordering of data relates to the primary key
// show without comments // write a comment // Trackback URL
Friday·27·January·2006
Literal text in attributes of HTML::Element nodes
I had to create an attribute for an HTML::Element like this:
// show without comments // write a comment // Trackback URL
Good articles from Perl.com
- Massive Data Aggregation with Perl by Fred Moyer
- Shows how to do a mod-perl based upload and give the user constant feedback via Javascript
- More Advancements in Perl Programming
- has a great piece on Yahoo’s public API for getting keywords from a document.
// show without comments // write a comment // Trackback URL
Thursday·26·January·2006
Catalyst SVN
How to check out the Catalyst CPAN distro via SVN
How to import sources
Browse for the directory you want thens!browser!repos/Catalyst!
e.g.:
svn import CatalystAdvent-Seamstress/
http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/CatalystAdvent-Seamstress
maps to http://dev.catalyst.perl.org/browser/trunk/examples/CatalystAdvent-Seamstress
// show without comments // write a comment // Trackback URL
Perl Search Indexing Options
- Plucene
- A Perl port of Lucene
- Lucene as a web service
- Brian Cassidy has Perl bindings for it.
- Xapian
- might be good, but very little support
// show without comments // write a comment // Trackback URL
Wednesday·25·January·2006
When writing Seamstress pages, componentize your tree transforms
Working with our Mason codebase today showed me something that would have been a lot harder in Seamstress. Basically, I was told to add a vonage advertisement in another table cell everywhere that we displayed a vbase_banner.
Up to this point, all pages using the vbase_banner looked something like this:
<& 'comp/related_topics_lander_2', aconf => $aconf, query => $query &>
<& 'comp/vbase_banner', aconf => $aconf, query => $query, align => 'left' &>
% if ($query->{'brand'} eq 'tbar') {
<& 'comp/tbar_foot', aconf => $aconf, query => $query &>
% } else {
<& 'comp/quickfoot', aconf => $aconf, query => $query, align => 'center' &>
% }
<& 'comp/footer', aconf => $aconf, query => $query &>
|
So all I had to do was toss a bit of logic in vbase_banner for the vonage_ad and I was done:
|
|
% if ($query->{pagetype} ne ‘KEY’) {
<& vonage_ad &>
% } |
|
With Seamstress, one could componentize a page by creating subroutines for processing each part, but one does not have to. This is a downfall in Seamstress in a sense. But nevertheless, with Params::Validate and HTML::Tree, one can still do the trick, but one must be disciplined about placing each tree transformation into a separate subroutine instead of having a subroutine with a series of
The end result of disciplined Seamstress usage is that you can refine subroutines and make wholesale changes across several webpages if they all point to the same place
// show without comments // write a comment // Trackback URL
CatalystAdvent example converted from tt to Seamstress
You can view the source here and download via
svn co
http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/CatalystAdvent-Seamstress
// show without comments // write a comment // Trackback URL
Charting Modules
- Chart by the Chart Group. seems like a focused set of people :)
// show without comments // write a comment // Trackback URL
Woven with HTML::Seamstress
- http://hp.qsrch.com/?prt=nn26&s=love
- http://hp.qsrch.com/?prt=nn26&s=lkajdfjak;lsdf
- http://hp.qsrch.com/?prt=sb01&s=love
- http://hp.qsrch.com/?prt=sb01&s=lkajdfjak;lsdf
// show without comments // write a comment // Trackback URL
My first Seamstress user!
I was elated to have a user of my module HTML::Seamstress. here is the bug he filed against Seamstress - and complete with a patch!
I am glad to have co-developer.
// show without comments // write a comment // Trackback URL
BookDB for Catalyst is done in HTML::Seamstress
I got HTML::Seamstress
up and running the bookdb example. Thanks to
Andy Grundman, I can commit to the examples directory on the Catalyst
svn site so BookDB-Seamstress is available
right here.
Converting it from tt to Seamstress led to a few improvements in HTML::Element::Library , namely the addition of iter2(), a more flexible routine for turning arrays of data into HTML list data, such as dl, ol, or ul.
I learned a lot about Class::DBI::AsForm in the process. That is a
very slick module that is underdocumented and highly magical. I have
pretty much decided to stick with
DBIx::Simple for all
of my database processing needs.
// show without comments // write a comment // Trackback URL
All the wares of sixapart:
- gearman a job schedular
- MogileFS
- perlbal
- memcached
// show without comments // write a comment // Trackback URL
Tuesday·24·January·2006
Humor about contract coding
// show without comments // write a comment // Trackback URL
Monday·23·January·2006
Don’t forget about the Snap search engine
Snap has a beautiful way of rendering
search results. I hope to remember that page more often.
// show without comments // write a comment // Trackback URL
Sunday·22·January·2006
A funny conversation about HTML::Mason
// show without comments // write a comment // Trackback URL
Saturday·21·January·2006
Putting revision numbers inline in svn
// show without comments // write a comment // Trackback URL
Friday·20·January·2006
Perl: Bad interpreter
- Is the NFS drive mounted noexec?
// show without comments // write a comment // Trackback URL
Garth’s test
sort
Sort these:( [2005,6],[2005,8],[2004,2],[2002,12] )
(note: a good second question might be: what sort algorithm does Perl
use and what alternatives are there)
iterator
write a sub that returns a closure, that when invoked, returns the successive elements of a passed-in array.// show without comments // write a comment // Trackback URL
Artur’s test
The monk climbs the mountain from 6am to 6pm. And the next day while he is descending from 6am to 6pm, a priest climbs. The priest gets to the top at 6pm, which is the same time that the monk gets to the bottom.
Is there a time that they are ever at the same height?
I solved this equationally at shopzilla somehow. I solved it
graphically at shopzilla. The next day, I realized, that the picture
of someone going down the other side was a red herring: if I had only
reflected the downward trip on the upward trip, I would have noticed
that they would cross paths!
// show without comments // write a comment // Trackback URL
Sixapart is neck-deep in talent
- Artur Bergman
- Tatsuhiko Miyagawa
- David Davis
- wrote perlbal, mogilefs, memcached, gearman
// show without comments // write a comment // Trackback URL
My second technical test at IMDB
- If a
SELECTis running too slowly how would you debug it? - why not index a bunch of individual fields in a database
Class::DBIiterators - how are they implemented? Are they efficient?- how does CDBI differ from other
DBIx::* - least favorite Perl feature
- what are you going to learn next about Perl?
// show without comments // write a comment // Trackback URL
Thursday·19·January·2006
GET versus POST
// show without comments // write a comment // Trackback URL
I cannot mount my 320gb external scsi hd
Here is the report from /var/log/syslog when I mount this
drive:
mount /ernest based on my fstab:
/etc/fstab
Here is my /etc/fstab// show without comments // write a comment // Trackback URL
Saturday·14·January·2006
Setting version number of a file in CVS
To remove sticky tag:
// show without comments // write a comment // Trackback URL
Friday·13·January·2006
That uri guttman is a barrel of laughs, let me tell ya
// show without comments // write a comment // Trackback URL
Steps to refactor the Catalyst sample app BookDB
- First, remove DefaultEnd and write an end method that will forward to either tt or Seamstress.
- Reword the Actions one at a time starting with book/list
// show without comments // write a comment // Trackback URL
If I could interview Sebastian Riedel
- Where do you work and what do you do?
- What languages did you use widely before Perl
- It seems like you jsut came out ofthe Blue with catalyst… how did you manage to absorb so much Conway and Cozens for so long and not publish on CPAN and why did you just explode out of nowhere
// show without comments // write a comment // Trackback URL
Thursday·12·January·2006
Things I’d like to write but will never get the time to:
Text::Template::Toolkit - a complete implementation of the tt mini-language in Text::Template.XHTML::2POD - POD DTD for XHTML, making authoring easier because XHTML indent’s nicely.
// show without comments // write a comment // Trackback URL
The first rule of refactoring
Do not go off and try to change everything. Get everything working in
a new directory, and then starting putting in your changes, hopefully
in incremental-enough fashion that you can keep a working product.
// show without comments // write a comment // Trackback URL
Wednesday·11·January·2006
The advanced object-oriented techniques used in Catalyst:
// show without comments // write a comment // Trackback URL
Perl competency test (imdb)
I took a small but good competency test when interviewing at imdb.
The cvs module name is imdb-perl-test and it
should be available via viewcvs in 3 hours.
Ah here
it is
// show without comments // write a comment // Trackback URL
find all paths of length n in a graph
// show without comments // write a comment // Trackback URL
Saturday·07·January·2006
Perl SQL competency test (sdc)
I took a small but good competency test when interviewing at a small
but good company here in Los Angeles :). It only had one
Perl question and one SQL question and I was lucky to get the SQL
question right.
The cvs module name is perl-sql-competency-test and it
should be available via viewcvs in 3 hours.
// show without comments // write a comment // Trackback URL
Friday·06·January·2006
Articles on trees in SQL
// show without comments // write a comment // Trackback URL
A conversation with Sebastian Riedel on query strings and dispatch
// show without comments // write a comment // Trackback URL
Thursday·05·January·2006
Webhosting
http://perlmonks.org/?node_id=521076
// show without comments // write a comment // Trackback URL
Wednesday·04·January·2006
How to find which package a binary exists in
// show without comments // write a comment // Trackback URL
Terrence Brannon
Matthew Sisk
