Now the Hard Part

Having thoroughly examined how Moose roles work, finding a good workable solutions to any problems I encountered, spec-ed out my basic Namespace, captured 90% of the roles I will need to create and mapped out the character creation process now I have t decide on how to put all the bits and pieces together.

So far I have these three 'Application' blocks Identified.

  • Character Creation
  • Character Instantiation
  • Game Play

I didn't bother to mention persistence as that is an obvious one but as seen below easy to implement.

charrec-front.jpg

So my dilemma now is to choose an appropriate design for the 'Application' as a whole.

From my diagram from an earlier post on character creation indicates that a simple Procedural style. The user starts with a set of dice rolls for abilities and is then presented with choices until a character comes out the end and is either persisted or dropped.

A Marpa-powered alternate C::Scan, and even a command-line

PAUSE is no longer paused

PAUSE was down. Now it's up. Yay!

Well done, and thank you to everyone who helped restore, and indeed help with the day-to-day running of PAUSE.

Attention Pinto Users: Use This Workaround While PAUSE Is Down

By default, Pinto is configured to use cpan.perl.org and backpan.perl.org as the upstream repositories. But since cpan.perl.org is currently offline, Pinto will throw an exception if you try to pull a module or distribution from upstream.

You can work around this by setting the sources key in the repository configuration file to cpan.stratopan.com. That site is a full mirror of both CPAN and BackPAN. The configuration file is located at .pinto/config/pinto.ini within the repository directory.

Weeding out The Bits

Well I was thinking today to present a net little perl script that read the PDF file I created in my last post and get some of the presto-chango automatic code generation.

Well I quickly gave that up as the PDF conversion simply but everything in alphabetical order so I lost any structure I had there. I did have to cheat and not use a PDF reader. I just slurped it in as a file and then use a reg-ex to suck out the bits I wanted. Really I had to double cheat and peek at the file first to see what to suck out.

Long story short without the structure intact I could of resorted to renaming all my objects to preserve the structure ie 1.1, 1.2 ~ 1.2.1 but that would take longer than just writing the Moose.

Strawberry Perl 5.18.2.1 released

Strawberry Perl 5.18.2.1 is available at http://strawberryperl.com
(all editions: MSI, ZIP, PortableZIP for both: 32/64bit MS Windows)

More details in Release Notes:
http://strawberryperl.com/release-notes/5.18.2.1-32bit.html
http://strawberryperl.com/release-notes/5.18.2.1-64bit.html

I would like to thank our sponsor AuditSquare.com for resources provided to our project.

Computer languages comparison. What else?

Intro
I would rather be quiet about this never ending topic, but after brians interesting post
about comparing percentages I have to contribute my thoughts.
I read some other posts about computer language rankings. Some supposedly based on web traffic
and others on books sales.
All this posts do mention some kind of measurements based on numbers. But I think that there are
other view points or considerations to take into account before asking for a valid computer
language ranking.

Ranking what?
In order to ranking things these must be comparable with each other.

Beside technical or linguistic considerations, let's assume as a comparison criteria
the quantitative or qualitative use of each computer language. Let the confidence of the
measurement (if possible at all) of the use as a theme for another post.

So, any sense of ranking JavaScript and C?
What can I do at system level with JavaScript? What can I do for a web page with C?

pause.cpan.org is not working. Does somebody know something?

Yesterday I wanted to upload d new release to CPAN, but I could not do it because http://pause.cpan.org/ is down.

This site is still down.

There are several posts on twitter, so it is just me:

* https://twitter.com/burakgursoy/status/421089874377072640
* https://twitter.com/kentnl/status/420871801053253632
* https://twitter.com/thaljef/status/421155094873133058

Maybe there is some info about when it will be fixed?

**UPDATE**: Here is the official info: http://log.perl.org/2014/01/multiple-hard-drive-faliure.html

When is an Org Chart Not an Org Chart

Well continuing on with my AD&D theme am taking another break from Moose Code and looking at design again. Well this time I wanted to see how many common 'roles' I might have between my differing Character Races and Classes and the large number of scribblings I have laying under my desk where getting annoying.

So I started with what I was most familiar with with ye old ULM Object Diagram using a little freeware designer from smartdraw. Well it worked ok for the base attributes of my Character class (name,race, ability scores etc.) as they will be put into a model eventually but it wasn't helping me with my roles as these are, for lack of a better words 'Business rules' and they where just cluttering up my diagram.

Don't Compare Percentages (use.perl.org blast from the past)

[I wrote this for use.perl.org in 2006, but I keep looking for it at the beginning of each year as numeric illiterates try to do the same flawed analysis to prove something about programming languages in the last year (this year it's Andrew Binstock at DDJ). I'm adding it to blogs.perl.org in case use.perl.org (now read only) suddenly disappears.]


sigzero recently asked if the Perl community was atrophying, someone else pointed me to Tim O'Reilly's State of the Computer Book Market, and there's a Wikipedia revert war over Tiobe's Programming Programming Index. All of these suffer from a misunderstanding of percentages and their value in making decisions and reaching conclusions. This is especially egregious when people divorce the percentages from the absolute numbers (either because the original data are restricted or the people know that they tell a different story).

Why I Didn't Submit A Patch

Currently RT cannot talk to PAUSE, so I can't submit a bug report for this:

perl -Mutf8::all -MDateTime::Tiny -E \
    'say DateTime::Tiny->from_string("୭୮୯௦-௧௨-௩௪T௫௬:௭௮:௯౦")'
0000-01-01T00:00:00

B::C[C] and rperl

With rperl we have now a second serious perl compiler project, which has distinctive advantages over B::C and B::CC, but also several disadvantages.

Basically we need to define compilation blocks for rperl (restricted perl) - typed and compile-time optimizable syntax - and combine it with unoptimizable dynamic perl5 syntax, to be able to run ordinary perl5 code, partially optimized.

Get Out Of My Namespace!!

Do_not_take_his_bone.jpg

If you been around in CPAN for a while and you are a adding the odd module you may or run into the above (well really any code repo ie PyPI, PEAR and the long extinct CJAN) .

Most likely you forgot to read 'On The Naming of Modules' and either put something in the wrong place or didn't notice the fist come first served in the 'Naming' paragraph of the Zen of Cpan.

So going back to my D&D game I know I will have to pick a namespace if I am going to add it to CPAN for others to have a look at. Luckily since I have the book in front of me I have a good Idea what I am going to do maybe like this

How to upload a perl module on CPAN using Dist::Zilla?

Today, I released my second CPAN module. While writing my first CPAN module, I used Dist::Zilla for uploading my module to CPAN, but when I looked into it today, I had to go through some dzil plugins again. So, I thought that I should write a blog post about this.

Basic directory structured of the module:

Assuming, my module name is X::Y::Z, I need to create a directory with name X-Y-Z. Output of find command should look like this:

lib                 # all code goes in lib/
lib/X              # code for X will go here
lib/X/Y           # code for Y will go here
lib/X/Y/Z.pm  # code for Z will go here
t/                   # all tests will go here
dist.ini           # explained below

For example : see this module.

Writing dist.ini:

Postgres full-text search w/ DBIX::Class

How to pass in a search term to postgres using DBIX::Class while still leveraging bind values to escape your input:

my $search_phrase = "snowden nsa";
my @rows = $rs->search(\[
  'to_tsvector(me.title) @@ plainto_tsquery( ? )',
  $search_phrase
])->all;

As is always the case with SQL::Abstract, TIMTOWTDI. In this case I don't particularly love the ArrayRef instead of the traditional HashRef, but that is how the cookbook had it, and it works. If anyone has a better method please leave it in the comments.

Adapted from the DBIX::Class Cookbook.

booking.com - a toxic company for developers

I have worked for Booking.com for 2+ years in their Amsterdam office as a developer and I need to let the developer community know about what to expect here.

Booking.com as you know is hiring aggressively under the pretext of growth; Yes, the company is growing about 40% YOY but the reason they are hiring developers “always” is due to the high attrition(employee turnover rate). Let me explain why this happens and the real Booking.com secret sauce which you would come to know only after working with the company and having wasted 2 years of your life.

  1. Booking.com treats its employees like dogs. And this is true regardless of the department you work in.
  2. Exploitation is the real secret sauce of Booking.com which has helped it pack a huge cash surplus. Exploitation of employees and hotels is the secret sauce.

Let me explain how exploitation is carried on in Booking.com:

No Moose is a Good Moose

Well after my Dice adventure I had a few bookmarked mods (Acme::Dice, Games::Dice::Loaded, Games::Dice::Advanced, Games::Dice, RPG::Dice, Games::Die::Dice and the one with the coolest name Games::Die that I looked at.

Being a good perl programmer I always like to do things the simple way by stealing I mean borrowing the hard work that others have done by consulting CPAN and as one can see from my little list above there are a good deal of them to choose from, one is written with Moose (Games::Dice::Loaded).

All I need is simple dice rolling so the ones that did other things where out, others allow some sort of 'Cheat' factor and I did not like that so they where out as well those that didn't have an OO interface where out.

That left me with 'Game::Die', 'Games::Die::Dice', and ' RPG::Dice'. 'Game::Die' did too little as it was just a instance of a single 'die', so that would mean more work for me.

Perl and Me, Part 5: Speaking with the speech of coders

This is part 5 of an ongoing series where I explore my relationship with Perl.  You may wish to begin at the beginning.

This week we look at Perl’s linguistic heritage.

Last week I talked about how good code reads like a story, and how Perl is the best language for writing stories in code.  The reason for this is of course the linguistics that are baked into Perl.

Ephemeral methods, or what to call 'dispatch to a variable containing a subref'?

In my last post, I use a Perl dispatch pattern where you store a subroutine reference in a variable and then use that as the method to call on an object. Like so:

my $method = sub { ... };
$invocant->$method(@args);

Is there a name for this pattern? If not I propose to call the “method” an ”ephemeral method”. Does this work for everyone?

Note that you really can’t call it a lexical method for several reasons.

Brainturk Mobile App

Wishing you all a Happy New Year .

We have released Brainturk mobile app on the Various app stores

iOS

Play Store: Free version

Full version on play store

Amazon App store Full Version

Free Version on Amazon

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.