Friday·24·February·2006
CSS Links
clearing
centering
// show without comments // write a comment // Trackback URL
Tuesday·21·February·2006
How to list the files in a Debian distribution
// show without comments // write a comment // Trackback URL
Wednesday·15·February·2006
I thought I was never going to be employed again
After each interview, I went home and threw anger fits, thinking: “I
should’ve said this here or that there.” I was beginning to think I
would never get another job. It’s said that I have to leave IBMC to get a job, because I had hoped
to be here for years upon years. But as it
stands, I had to opt for a place with a lower cost of living and
open space, fresher air and less people.
// show without comments // write a comment // Trackback URL
Tuesday·14·February·2006
an XPath engine that can be re-used by other classes that implement trees
Michel Rodriguez, the XML genius, has done it again. First it was with
XML::Twig.
Now, he has implemented Tree::XPathEngine
to allow to XPath usage on any tree module that implements the
required methods!
// show without comments // write a comment // Trackback URL
Friday·10·February·2006
A question one might ask at a technical interview:
Explain how high volume and a load-balanced environment can affect one’s coding approach.
My answer would be
- one might resort to caching of data (perhaps with Memcached, perhaps with Memoized).
- one might cache database handles (with Apache::DBI) or try to pool them
- one might create static content as much as possible and certainly be sure to have Apache serve all parts of a page which are static such as images.
- one might replicate the database
- Given a text file with a full name on each line, print the 10 most common last names in the file… also do this in SQL.
- what does use strict do
- what variable controls inheritance in Perl
- a sub that modifies a hashref - trick question: they made a copy of the hashref in the modifying sub
- parse a URL
- simple INNER JOIN
- composite indexing question
- how to check if a slave is up
- hOW TO to see which processes heavy
- how to see disk activity
- How to see disk usage?
- how to check if apache is up?
- Design a couple of pages for a yearbook website
// show without comments // write a comment // Trackback URL
Monday·06·February·2006
Infinite job rejections since my layoff at Vendare:
- Strategic Data
- Shopzilla
- Fonality
- place-base.com
- Well, checkup one more: sixapart.com just passed on me too.
- oodle.com
- And another: CPO Commerce
-
And another in Grand Rapids, MI:
I heard back from Priority today, and unfortunately, they’re not going to go forward with us. Here is the feedback we received: This candidate is really exactly what we were looking for when we started. However, after speaking with Guy and in light of other internal projects that we have going, we’d like to go with Guy It appears that this “GUY” has some other skills that they believe will help them down the road. He’s got more of a Healthcare background, I guess. Sorry about this one. I hope to work with you in the future, and please feel free to keep in touch. Thanks again Terrence,
- And the mania continues: imdb.com just passed on me too! yeehah! Boy, my self-esteem is soaring!
// show without comments // write a comment // Trackback URL
Saturday·04·February·2006
Not too simple for CPAN
It has been said before that this code is “too simple” for CPAN, but I must disagree. I have seen people write this kind of code over and over again and they always get it wrong. Perhaps now they will spend more time getting the rest of their code right…Leon Brocard in the docs for Data::Page
// show without comments // write a comment // Trackback URL
Thursday·02·February·2006
I wish I were this good:
Web Developer
Reply to: swjobs@imageworks.com
Date: 2006-01-31, 4:22PM PST
Sony Pictures Imageworks, an Academy Award winning digital production studio, is seeking an experienced Web Developer. This position will code web applications using Perl and JavaScript working under the direction of a senior web applications developer.
Qualified candidates must have 3-5 years experience analyzing complex business processes and transforming these processes into maintainable, flexible, and configurable software systems. Candidates must be able to show the ability to breakdown a business process into roles, domain objects, state transition diagrams, and workflow. Additionally, candidates must show a firm understanding of design patterns, particularly separation of concerns. Candidates should be self-starters comfortable with gathering requirements and interacting with end-users to expand and improve application functionality.
The ideal candidate is a Perl expert who is well-versed in the more advanced features of the language, including duck typing, closures, and functional composition. Additionally candidates should have a firm understanding of the Oracle database, including schema creation and the use of explain plan to optimize queries. An exceptional candidate would also have the ability to write web application GUIs, including the use of Javascript and AJAX.
Required skills:
Perl
HTML/CSS/Javascript/AJAX
Apache/mod_perl configuration and deployment
Oracle (DDL,DML,PL/SQL)
CVS/Subversion (including the ability to branch and merge)
Ability to develop in a LINUX environment
Helpful skills:
Java/J2EE/JBoss/Hibernate
Python
SOAP
XSLT
// show without comments // write a comment // Trackback URL
Wednesday·01·February·2006
HTML::Seamstress::new_from_file() now reblesses the whole tree
To date, Seamstress has supported tree-based rewriting of HTML
trees by blessing the $tree into a class which has these
superclasses - HTML::Seamstress,
HTML::Element::Library, HTML::Element, and any local
Element library. That way, you can rewrite the $tree by
going:
$tree->this; $tree->that;Well, that was all good and fine until today when I tried to call this and that on a subtree of
$tree:
my $div = $tree->look_down('_tag' => 'div');
$div->this;
$div->that;
and it did not work because $div was blessed into
HTML::Element instead of a class which inherited from the
above-mentioned superclasses.
So, the solution was to simply bless all nodes of $tree
into the same class. A test case 02.treebless.t shows the new
functionality:
package tree::bless;
use Test::More qw(no_plan);
use TestUtils;
use base qw(HTML::Seamstress) ;
my $root = 't/html/treebless';
my $tree = __PACKAGE__->new_from_file("$root.html");
my $li = $tree->look_down(class => 'greg');
is (ref $li, 'tree::bless', 'blessed into proper class');
// show without comments // write a comment // Trackback URL
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
