Using the Perl debugger with DBIx::Class

Using the Perl debugger with DBIx::Class

Today’s debugger hack will make using the debugger with DBIx::Class much easier.

Wrapping a C shared library with Perl and XS

Wrapping a C shared library with Perl and XS

This tutorial shows how to wrap a C shared library using XS and Perl (including creating a trivial test shared library).

Also posted to PerlMonks where the discussion references InlineX::C2XS.

Continuous Integration. CircleCI vs Travis CI vs Jenkins

Continuous Integration. CircleCI vs Travis CI vs Jenkins

The main goal of continuous integration is to identify the problems that may occur during the development process earlier and more easily. If you integrate regularly — there is much less to check while looking for errors. That results in less time spent for debugging and more time for adding features. There is also an option to set up inspection of the code style, cyclomatic complexity (low complexity makes the testing process more simple) and other checks. That helps to minimize the efforts of the person responsible for the code review, saves time, and improves the quality of the code.

Direct link

A Simple Guide for Python Packaging – Small Things about Python

A Simple Guide for Python Packaging – Small Things about Python

Code reuse is a very common need. It saves you time for writing the same code multiple times, enables leveraging other smart people’s work to make new things happen. Even just for one project, it helps organize code in a modular way so you can maintain each part separately. When it comes to python, it means format your project so it can be easily packaged. This is a simple instruction on how to go from nothing to a package that you can proudly put it in your portfolio to be used by other people.

Direct link

Make files not war: How to write short, readable makefiles that work

Make files not war: How to write short, readable makefiles that work

This article tries to explain make and it’s makefiles in slightly different terms than the original documentation or even most tutorials. It took me a long time to understand how to write short, simple and understandable makefiles that work, and I hope this article may help people by providing another view.

This article assumes a Linux system and GNU make, though I will discuss some of the differences concerning Windows and BSD.

Direct link

Callback Functions Between C and Perl

Callback Functions Between C and Perl

Everything you ever want to do with xs is documented somewhere in perlxs, perlguts, perlapi, perlxstypemap, and perlcall. Figuring out where it’s documented, and how it relates to everything else, is the hard part.

Design Patterns for Humans – An ultra-simplified explanation

Design Patterns for Humans

A topic that can easily make anyone’s mind wobble. Here I try to make them stick in to your mind (and maybe mine) by explaining them in the simplest way possible.

Learn C Programming With 9 Excellent Open Source Books

Learn C Programming With 9 Excellent Open Source Books

  • The C Book
  • C Elements of Style
  • Build Your Own Lisp
  • The GNU C Reference Manual
  • The GNU C Programming Tutorial
  • Essential C
  • Beej’s Guide to C Programming
  • Modern C
  • An Introduction to GCC

Learn ORM in Perl with DBIx::Class

This post will provide a brief hands-on introduction to ORM in Perl using a few DBIx::Class sub classes.

In detail, this means we will generate Schema, Result and ResultSet classes (Perl modules) which will be used to interface with a SQLite database. The database will contain a single users table. Once the database has been created, we will implement functionality to both return the full name of a user, and find all users under a given age. To ensure the functionality of the schema, this code will be implemented using Test Driven Development (TDD), where the tests will be written first, then made to pass as we add new functionality.

This article is divided into two parts. The first part is doing the groundwork — installing Perl modules, setting up the directory structure, the database to test against, and a unit test against which we can measure our progress. In the second part we will create a database and use DBIx::Class modules to make the tests pass.

part 1 — installing Perl modules, setting up the directory structure, the database to test against, and a unit test against which we can measure our progress.

part 2 — creating a database and using DBIx::Class modules to make the tests pass.

Emulating Just About Any RESTful JSON API

Emulating Just About Any RESTful JSON API

My conclusion is that you should write an emulator for any service you are developing against. Not just that but release an emulator for any RESTful APIs you are developing for others so they can trivially test their client code.

Having done the emulation dance for at least three modules I’ve written I suggested I would write something to make this easier. I managed to find some time last week to do this.