Recently a new book on software testing in Python projects was published by Packt Publishing, “Python Testing: Beginner’s Guide”. I’ll read the book the coming weeks (it didn’t arrive yet) and publish a review later on.
If you’re into Python software development, you might want to take a look at the book webpage, or download a free chapter (PDF) about the standard Python unittest package for now.
Since I’m not a big fan of extensive/exaggerated unit testing and rather believe in functional/component tests, I’m looking forward to read the book and learn some new things. Looking forward to the web application testing chapter, among others.
Disclaimer: I was invited by Packt Publishing to review this book, and they provide a free copy.
Posted in Development.
By Nicolas
– February 23, 2010
MacBook:~ nicolas $ telnet chat.facebook.com 5222
Trying 69.63.176.191...
Connected to chat.facebook.com.
Escape character is '^]'.
<stream />
<?xml version="1.0"?><stream:stream id="F6DE2CB5" from="chat.facebook.com" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en"><stream:error><invalid-namespace xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error></stream:stream>
Connection closed by foreign host.
Jay!
Posted in Technology.
By Nicolas
– November 7, 2009
I’ve been into Scala lately. More about it will follow later, but there’s something I found out which I really like.
Last couple of days I wrote some very basic Scala snippets, containing constructs which would be non-trivial or ‘unusual’ to write in Java, compile it to a class file, and then use a Java decompiler to figure out how the Scala compiler maps those constructs to JVM bytecodes.
There’s one thing which took my attention: looks like (basic) tail-recursive functions are optimized into while-loops! This only happens if the last call of a function is a call to itself (the most basic form of tail recursion), but it’s an interesting feature anyway… No more need to put socket accept handling in an infinite while loop 
Continued…
Posted in Development, Technology.
Tagged with Development, functional programming, java, scala.
By Nicolas
– August 12, 2009
Recently I worked on some new project, and as always I created a local Git repository as a start. After working on it several days, creating lots of commits, I had to publish it into the central Subversion repository (which is one of the VCSs we got). I could have done this by creating a new folder in SVN and add the latest version of all files of the project to it, but that way all history would be gone, which I didn’t like.
Git has a feature to work with SVN repositories, git-svn, but that’s intended to check out existing code from SVN and work on it, not publishing an existing Git tree into a Subversion repository.
A first rather naive approach didn’t work out (as somewhat expected), but then I figured out how to achieve this anyway.
Continued…
Posted in Development, Technology.
Tagged with git, subversion, svn.
By Nicolas
– July 25, 2009
Looks like Microsoft releases the Linux drivers to enable a Linux kernel running as a guest in a Hyper-V hypervisor to run in ‘enlightened mode’, which sounds pretty much like Xen’s PV drivers for Windows, providing better IO performance, under the GPLv2 (which is the same open-source license as the Linux kernel itself). Quoting the Hyper-V Architecture and Feature Overview:
Enlightened I/O is a specialized virtualization-aware implementation of high level communication protocols (such as SCSI) that utilize the VMBus directly, bypassing any device emulation layer. This makes the communication more efficient but requires an enlightened guest that is hypervisor and VMBus aware.
The drivers seem to be developed by Novell, so I guess the Boycott Novell guys will have some more coverage^Wrants soon
(Update: can’t find the reference on this anymore, so this might be a false statement, sorry. Thanks for pointing out RubenV)
Interesting times on the virtualization front… Although I for one do not plan to replace Xen, xVM or VirtualBox anytime soon.
Sources:
On a side note: Red Hat entered the Standard & Poor’s 500 index, which might show Linux is gaining more interest from enterprises and investors.
Posted in Linux, Technology.
Tagged with Linux, microsoft, virtualization.
By Nicolas
– July 20, 2009
(This is a reply on a post by Ahmed Soliman on recursion performance in (C)Python, and CPython function call overhead in general. I started to write this as a comment on his post, but it turned out much longer, so sending it over here in the end.)
Hey,
As discussed before, this is not a fair comparison, since the non-recursive version is much ’smarter’ than the recursive one: it calculates values and will never recalculates them, whilst the recursive version calculates everything over and over again.
Adding some simple memoization helps a lot. First, my testing code:
Continued…
Posted in Development, Technology.
Tagged with Development, python.
By Nicolas
– July 16, 2009
Some weeks ago I attended JavaOne (a pretty neat conference, even for non-Java-heads like me) and got in touch with several non-Java languages running on the JVM (nothing really new next to Project Fortress, but I never got into most for real).
Since I wanted to learn some language not resembling any other I already know (even a little), I decided some hours ago to start digging into Clojure, which is a LISP dialect running on the JVM using STM (Software Transactional Memory) and created with concurrency in mind. Check the website for more information.
Continued…
Posted in Development, Technology.
Tagged with clojure, Development, jvm.
By Nicolas
– July 12, 2009
Been looking (again) at XMPP recently. While browsing through existing source code and samples in several languages, there’s one pattern which comes back quite frequently in ‘echobot’ demos: when a message comes in, the to and from attributes are swapped, and the message is sent.
The most common approach is something like (pseudocode):
temp = from
from = to
to = temp
In Python there’s an easier approach though which seems to be unknown to several developers. It uses the multi-assignment/expansion syntax:
from, to = to, from
Basically, the tuple on the right (to, from) is constructed, then expanded to locals ‘from’ and ‘to’.
Just a hint
It’s a pretty elegant line of code IMHO.
Posted in Development.
Tagged with python.
By Nicolas
– April 22, 2009
Sun acquired by Oracle. Yet another employer
Posted in Technology.
Tagged with oracle, Sun.
By Nicolas
– April 20, 2009