Quantcast
Channel: Perl Alchemy - notes of a programmer
Browsing index pages (27 articles)

Debugging bayesian filters

It is a common problem when a trained filter miscategorizes something and you'd like to know why - what is really the feature that puts the most weight into the wrong category? Or sometimes you'd like...

View Article


Immutable objects and Dependency Injection

At some point we had:in our code. Text::FeatureCount was at that time an accumulator that was counting the document features and saving them in internal structures. Multiple subroutines were using...

View Article


Dependency Injection and open-sourcing generic parts of apps

using DI in CPAN libs makes them more universal - but DI even more important is when you want to open-source some generic part of your application. Your boss agrees and then you encounter code like this:

View Article

A simple quine

I wrote a quine:

View Article

Interactive presentations

At my latest YAPC talk I used questions to the audience to make sure that everything is understood. That does not mean that I asked 'do you understand it' - but rather I asked 'how would you estimate...

View Article


Why web frameworks tend to grow to become such unwieldy beasts?

Most of the web frameworks I know tend to do at least two things - the web stuff plus creation and initialization of all other components. This means that the framework is coupled with all of these...

View Article

Non compatible changes in WebNano

In my latest commit in WebNano I refactored a lot of code and changed the API in a non-compatible way. I am going to make a new release with those changes soon. I feel that doing an additional release...

View Article

On the importance of intuitive names.

PARTICIPANT:[Reading names of classes]Binary reader, Buffered stream, Reads and writes...[Pauses, Scrolls through list of classes].So let me just...stream writer. Implements a text writer writing...

View Article


Tricky problems of the Perl language - a completely arbitrary list

Overloading and parameter types validation.Clash between overloading hashification and arrayification and the each, keys and values with the new dereferencing semantics.There is no way to know if you...

View Article


If all of your state is on the stack then you are doing functional programming

Consider this: This is imperative code, it uses variables with state, but from the outside it is a pure mathematical function. This is because all of its variables are created anew when the function is...

View Article

A Data::Dumper bug - or Latin1 strikes again

I did not believe my boss that he found a bug in Data::Dumper - but run this: To get a character that has internal representation in Latin1 I could also use HTML::Entities::decode( 'ó' )...

View Article

Image may be NSFW.
Clik here to view.

Breaking problems down and defaults

In a classic essay Dave Rolsky wrote: Want Good Tools? Break Your Problems Down. I wish more people have read this and applied the advice - CPAN libraries would be more useful then. But stating the...

View Article

What if "character != its utf8 encoding" is overengineering?

"You shell not assume anything about the internal representation of characters in Perl" - is a mantra that has been repeated over and over by the Perl pundits for something like a decade. But there are...

View Article


Plack::Middleware::Auth::Form - some updates and a possible name change

I'll make a new release of Plack::Middleware::Auth::Form soon. There are quite a few fixes in the Plack::Middleware::Auth::Form repository gathered since the last release. It is all from external...

View Article

Blog writing and assuming stupidity

Writing a blog is not easy. People did not change much since the 'bread and circuses' times. You need to spicy your writing up with strong statements or you'll not get any audience. On the other hand...

View Article


Verbs and Nouns

There is a popular, if a bit long and blurry, rant by Steve Yegge: Execution in the Kingdom of Nouns - it is about how we overuse nouns and under-use verbs when programming in Java. Of course it is not...

View Article

WebNano - code experiments

WebNano is only a few hundreds lines - but you can arrange it in many many ways - and then you need to test it with all kinds of URL schemas and controller architecture. I do a lot of exploratory...

View Article


Why Bread::Board looks mostly redundant

This is based on two assumptions - that you don't use BB as a kind of Service Locator (but I agree with for example Dependency Injection != using a DI container that this is an anti-pattern) and what...

View Article

Mason 2

Mason 2 looks very interesting. First of all it has the a file a page modus operandi that works so well for PHP, then it has all the template inheritance and Moose template candies that look very...

View Article

Schlep

Schlep is tedious, unpleasant task.  According to Paul Graham schlep is also what really defines a company - it is doing the tasks that are unpleasant and tedious for someone that they would pay you...

View Article
Browsing index pages (27 articles)


Latest Images