Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

26 June, 2013

The seemingly separate world of tiered development enclaves.

I realise the subject of this post is a bit of a mouthful but it was the best I could do to summarise what I'm thinking.  In the world of software development there are often a series of cliques based on languages and/or platforms.   In other words, we have our Java/C#/Python/Ruby/Erlang/Scala/etc. running on Solaris/Linux/FreeBSD/Windows platforms.   There are tight knit groups fervently gathered around almost any combination of those two collections.

The impetus for this rambling is that there are expectations that each group places upon everyone regardless of group.  For the Java/C# crowd, as an example, there is an expectation of certain protocols and mannerisms of doing things such as the use of SOAP and XML for webservices or the Python/Ruby/Node.js equivalent crowd touting heavy use of JSON and ReST based systems.  

What amazes me is that the more closed in a group, the greater the expectation that the world does everything the same way seems to grow, not shrink.  Note that this doesn't imply everyone, just a surprisingly larger number than anticipated (by a long shot).  I don't mean to imply this is across the board with no exceptions.  People used to working with web services in Java utilizing SOAP and XML seemingly care little (and know less of) the more current alternatives such as JSON and the various frameworks and standards.  This is a problem because it leads to an adversarial misunderstanding which I think holds back collaborative situations as well as opportunities to expose individuals into a more cross environment manner of function.  

I know that with my near-two decades of professional experience that I have worked in a core of languages (Perl, PHP, Python, Javascript, Ruby, ARexx, Pascal, etc.) with a series of acronym based technologies and formats (JSON, XML, PostScript, YAML, etc.) but that there are people out there flabbergasted to find that I've never had to work with CORBA, SOAP, XSLT, COM or even something as innocuous as certain frameworks whether Cake, Struts, Catalyst, .Net or Seaside.  

The reaction is often one of shock and confusion because for so many, the entire world revolves around a solid set of standards, practices, protocols and languages which without, so many would feel like a fish out of water.  In reality there are only so many ways to write an 'If loop', or an iteration over objects in an array/list/hash/tuple/set, etc.  There are only so many ways to re-implement MVC frameworks or 3rd party libraries.  

I often make it a practice to keep current with the langauges, frameworks and protcols of my not-so-close (codebase wise) friends so my familiarity is there, and has actually benefitted me during technical interviews over the years.  This ties into what I'm saying, I will come back off of this slight detour.  I was at an interview for a perl position at a large development company in the King of Prussia, PA area back in the early 2000's and it involved a 6 hour interview process on-site.  I will spare most of those hours but there were two 45-60 minute interviews that stood out.  The first was on 'C' followed by 'Java', neither of which I've coded professionally (or personally for any non-learning period of time).  Keeping current did help me muster my way through the concepts and what not, albeit barely.

This is where I bring it back to my original point for this post.  A couple of years later down the road during a technical interview for a job in a language/environment which does not have the concept of 'interfaces' (as in the C#/Java sense (to name a couple)), I was asked such a question.  I first pointed out that interfaces don't exist in the target environment as it does in C#/Java, and then proceeded to give a crude explanation on how those are used in Java.  The sound on the other end of the interview table was subtle but noticeable; One of confusion as to how someone doesn't use such constructs (or the fact that not all languages/platforms uniformly implement the same exact concepts).

It really comes down to education, in both directions (and I'm not implying academia to be clear).  Engineers should be able to keep their familiarity with other languages/platforms current enough to be able to understand those difference between both their local toolsets and those of everyone else (to a reasonable degree).  Just because I don't code in Scala professionally doesn't mean that I shouldn't read articles about Scala's 'traits', or that I should ignore a different write-up on Groovy on Grails despite not using Groovy or Grails.

This also means that those engineers of the Microsoft stack should at least familiarise themselves with what Django is, a bit of Rails, maybe some PHP and Perl, a little bit of Lua and Lisp/Clojure/Scheme, etc.  In a former situation I ended up taking the development lead in a Microsoft heavy envioronment writing Classic ASP for the first (and preferably last) time, so I've practiced that which I preach.  Knowing some of the pieces that differentiate the languages also give insight into work and processes that may be missing from our own stack(s).  Our corpus of knowledge collectively shouldn't have such extreme gaps from discipline to discipline because it as a whole divides us from possibly creating the next big thing as well as (maybe more importantly so) fulfilling our individual potentials as developers/engineers/creators.

So take this as an opportunity to visit that neighboring x/y/z technology users group, maybe even a smaller convention/conference to get uncomfortable yet ultimately expand one's own horizon and knowledge-base.  Only good things can come of this.  Continuous improvement doesn't solely refer to processes and applications but people as well.

08 January, 2012

Theorising vs. Doing

Over the past many years I've found myself slowly moving (in my personal projects) from the realm of actually implementing code about which I've been curious to spending my overwhelming majority of my free time to theorising about various concepts and/or interests, primarily in the field of human language parsing, simulation and simplification of generic real-world object modelling.  Several of these have been mentioned and explored in previous posts over the last 7 years.  

I believe a great reason for this change in focus is partially age, and primarily due to the extent that my days are focused on building the next great startup application.  We recently (as of the New Year) pushed the past eleven months worth of work into existence as our new primary (Python/Django) product replacing the previous multiple iterations of our legacy (Java) product.  The focus and scope of the project limited my ability to go off on tangents wherein I could code my personal projects freely.  This was by no legal hand binding, it was simply a matter of wanting to focus my writing to building our product to the level it needs to be, to the high standards we require (and rightfully so).  

This leave one (me, namely) with little actual time to thunk down in front of my primary workstation to commit theory to codebase, hence I've found myself working it out on handheld whiteboards, sketchpads,  napkins, chalk on the ground whilst playing with my daughter or even simply working these theories out in my head.  While I would like in many cases to put my thoughts into actual runnable logic, I've found that the exercise of stepping through theoretical code in my mind has kept me sharper regarding my thought processes.  True, I cannot share this as easily with friends afar, but given that many of my personal friends are also senior level engineers, discussing (when we do) casually my theories and ideas, they get the gist quickly.  

The point I'm trying to get across here is that while today is perceived as one wherein a bunch of 20 year olds either in or fresh-out-of college spend an obscene amount of hours in incubators or at startups killing themselves churning out ridiculous amounts of code, there is most definitely no slow down in the thinking processes of the more senior of us out there.  We just don't find a necessity it raw churning out of code as it is the concepts that drive the field and aid in future innovation.  Let those who wish to "do" continue to run their path, but lets not overlook the value of those who've moved their focus (whether by situation or by intention) to the more abstract realm of theory as the two are inextricably bound.  We need ensure that these two distinct groups of people are in contact with one another because it will ultimately lead to the newer advances, bettering our field for all involved.

19 March, 2010

What's In Your Dead-Tree-Format Library?

Whilst cleaning and reorganising my home office, I came to the realisation that I have accumulated quite a decent amount of books on the various topics in my trade & hobby, software engineering.  After placing my various titles properly in groups on the shelves, I took a photo and it is shown below.  What follows is a breakdown on each book, my thoughts and the source of how it was attained (where remembered/applicable).  Note: Not included are three books currently in transit via Amazon.  One is on ajax, and two are FreeBSD server administration related.


Top shelf first, going left to right:

The Linux Database Bible :: This was a $50.00 book received as a freebie when I attended Linuxworld 2002 at the Jacob Javits Center in NYC.  I can't say that I've used this book much for anything other than the occasional reading fodder when nothing else was within reach.  I'm sure it would be of more use to newbies to both Linux and databases, even now.

Python Essential Reference, 2nd Edition :: I picked this up back in 2003 whilst doing work for a financial company at which I was both senior developer as well as newly appointed (reluctant) CTO.  This is a David Beazley book, and I highly recommend any version of it (there are several newer than my copy) as he is clearly full of expert level knowledge on all things Pythonic.

Python Cookbook :: This was another 2003 or 2004 purchase mainly out of curiosity to see what crafty, yet elegant solutions other Pythonistas has designed and/or implemented.  Definitely a wealth of information on a multitude of topics be it recursively traversing b trees or working with simple CSV files.

Python Pocket Reference :: A simple reference mostly useful for the "batteries included" libraries.

Python Programming Patterns :: This book has shown me why we generally don't rely heavily upon patterns such as those overly used in Java software.  I purchased this along with the Python Cookbook, and quite frankly if I had only acquired this book, my disappointment would have be far greater as I would've had nothing to take my mind off of it.

Perl to Python Migration :: Picked this up at the Micro Center in St. Davids, PA in the early 2000's when I started to migrate some of our perl applications over to Python in the financial world.  Highly recommended, especially for heavy, long-term perl hackers.

Pro Django :: Picked this up in early 2009 as further reference and idea material for the 4 websites I write and maintain for a series of internationally published magazines.  I'm torn on the value of this book, but at least it goes beyond beginner level.

The Definitive Guide to Django, 1st Edition :: Purchased as a reference as soon as it came out, references version .96 of the framework, so if a person is using v1.xx or higher, there are going to be quite a few caveats in the examples, otherwise a wonderful reference, especially when it comes to the appendices.

Practical Django Projects :: A bit of a disappointment as it focuses on blog creation for which a series of examples of this ilk already can be found online for free, not to mention in the Pinax project.

PHP and MySQL Web Development :: I just received this book from a business partner and whist I generally avoid PHP like the plague, I am glad to have references which are a bit more current these days for when I do need to venture into such environments.

Setting up LAMP :: Same as above.

PHP Solutions :: Ditto for this book as well.

Pro Drupal Development :: ibid on this one too.   I don't think I'll ever end up using Drupal, but at least I have a reference if I ever need tit.

Programming PHP :: I inherited this from the previous CTO at the financial firm at which I worked back in 2002/2003 and it has served me well as a reference book.

PHP Pocket Reference :: This also was provided to me with the Programming PHP book.

Programming Ruby, 1st Edition :: The Pick Axe book as it is more fondly referenced by Rubyists.  I picked this book up in 2007 so as to further my own understanding of perl's successor.  I was, in fact, reading it early this evening, though I still find it considerably less useful professionally for me than Python and other solutions.

Programmers at Work, 1st Edition :: This was left to me by a business associate from Ecquire prior to relocated elsewhere.  It is the predecessor of "Coder's at Work", and contains some early Apple, Microsoft, Adobe, Xerox and HP developers and views on the industry.

HTML 3 :: Truth be told, this was bequeathed to me by the surviving relatives of my ex-wife when her younger brother died in an untimely manner.  It is rather outdated, though kept solely as a remembrance of a young life that had potential in several areas of his life.

The Pragmatic Programmer :: I might not like a lot of the most recently branched out Pragmatic series be it books or podcasts, but this book is gold in my eyes.  I made this a company purchased, required reading for all developers from Junior to Senior level everywhere I've worked.  It most recently was recommended to an Intern I mentored during the 2009 summer season.  It has also proven valuable to other associates, even those not directly involved in the Software Engineering field(s).

OOP Demystified :: I purchased this book as a means of helping to teach others the basics of Object Oriented Programming.  It is a rather basic book, and uses the transitional OOP examples cases of registering for a class and doing payroll, like umpteen other books on the topic.

Middle shelf second, again from left to right:

Open Source Development with CVS :: Picked this book up on an departmental outing back in 2000 when moving into the Lead Developer role at a Manufacturing company which didnt have an existing source control system in place, and it wasn't yet time to use Subversion and the company was too cheap to acquire Perforce licensing.

Practical C Programming :: Every developer has at least one reference book for C, many have more.  I'm not a big C guy myself, though I find this O'Reilly reference book a wonderful additional to any library, maybe short of the K&R tome.

Teach Yourself C++ :: This book by Al Stevens was something I'd picked up as the desire to torture myself with C++ a.k.a. Bjarne's plague upon the coding world.  I sooner should've picked up a book on Smalltalk or Objective-C.  Note, the book is written well, my comments are mainly aimed at the abomination which is C++.

Learning Java :: I didn't buy this book as a Java reference in as much as I did for its first four chapters, which by and far the single best example laden object oriented chapters of any book, bar none.  Oh, and they are quite humorous as well.

Head First Java :: When recently wanting to get back into the Java world a bit more than in the past (with my playful experimenting), this was ordered on the recommendation of a good long term friend of mine, himself a Senior Software Engineer focused heavily in Java environments.

Java in a Nutshell :: Standard fare O'Reilly reference book, though drier than others and while laid out clearly, something felt amiss.

Core Java :: Sun's own sanctioned Java tome.  Massive, and packed full of information (and for the price is had to be).  Heavy examples on applets and AWT, which as of this writing is a decade out of date.  Makes a great bookend due to its size.

Java2 : A Beginner's Guide :: Probably one of the nicest Java2 introductory manuals.  This one has been loaned out to newbies to Java more than any other Java book in my library.  Clearly written and never dull.

Javascript, The Missing Manual :: Recently purchased and while full of information spends too much effort on jQuery, so much to the point that the book might've been more aptly named "jQuery", and subtitled "with a chapter or two on non-jQuery javascript".

Linux Programming :: Also bequeathed by my ex-wife's famliy.

Linux in 10 Minutes :: ibid.  See above.

Turbo Pascal, 3rd Edition :: Pascal, while originally a teaching language is also an imperative, procedural language good for systems programming much like C and only slighly slower.  Having moved to Pascal from various versions of Basic and ML, I was happy to take this off of my wife's friend after he completed his Pascal course at university.  The section on algorithms is still one which I reference routinely, hence the reason isn't packed away in a box.

Perl 5 Programmer's Reference :: A $4.99 special at a Banes & Noble in Abington, PA back in 2001.  Only covered version 5.004 of perl, but was so well laid out that it beat anything that O'Reilly could muster for perl references.  Quite possibly out of circulation/print as of this article's writing.

Learning Perl Object, References and Modules :: Essential reading for any non-purely functional code to get written when subjected to perl environments.

Programming with CGI.pm :: Nothing says well engineered than written by an engineer at Jet Propulsion Laboratories.

Programming the Perl DBI :: Anyone doing anything with databases in perl,  will benfit from this thin yes most definitely useful book.

Perl Best Practices  :: I pick this up after reviewing another copy at an Internet Hosting firm for which I did someork..

Object Oriented Perl :: Damien Conway's opus for Perl and Object Orientation.  Explains limitations and information for making robust Django.

Practical PostgreSQL :: Acquired when the original plans for some of my publishers dontnet

Bottom shelf lastly, contains my spoken language reference library which contains books on:

Dutch, French, Japanese, Welsh, German, Korean, Russian and Spanish.  The majority being in Dutch including several novels and grammer books, followed in a distant second by Welsh grammar books (mostly picked up in Waterstones in London surprisingly), then in a close third, Japanese.  I like languages and I do not limit myself to simply one or two.  Anyone who follows looks at the list of people whom I follow on twitter will easily see all of the above languages utilised, sans Welsh (quick, somebody contact Alan Cox!).

Bonus:  Some of my die-cast cars including my highly favoured Peugeot 206 WRC model that I picked up for £2.99 at Hamley's in London back in '03.  I collect the occasional model car here and there, mainly German, French, English and Italian based, but that is fodder for another blog.

25 September, 2007

Write Source Code for Other Developers, Not the Computer.

I’m not sure as to whom to attribute the following statistic, but i believe it was something along the lines of this;  Code is read vs. written on at a 10:1 ratio, meaning that the is far more reviewing of any specific codebase than there is writing to said code.  Furthermore, the majority of software positions involve maintaining and modifying existing code as opposed to creation of new code from the ground up.


To what does all of this allude?  The importance of writing clean code.  Knowing full well that other developers are going to have to read, understand and most likely modify your code in question at some point(s) in the future.  This is where our responsibility as software professionals (even in the case of hobbyists) comes into play.  


Several languages have tried to address this problem by intrinsic design decisions.  Most notably among those in recent times are Java and Python.  Java does so by its explicitness by design, and Python by its forced formatted a la the whitespace requirement.  Both are effective in what they do, however there are still a multitude of ways in which both can be written in a harder to read format.  Obviously choice of variable, function, class and object reference names is a very large point of readability (or not) which really cannot be enforced by a language specification.  Let us take a look at this very issue and while we’re at it, i’ll be clear that this is not a Python vs. Java issue discussion.


All too easily so many coders (I know this from having had to look at, understanding and refactor their code) overlook one of the best sources for building readable code, and that is their naming convention.  There have been several best practices and coding style specifications documents produced that one might think me as flogging a dead horse, but I assure you this is not the case.  


In the following examples we see a variation of languages and how we might commonly see the same variable name referenced (and initialised as it were):


Smalltalk:


num_of_doors = 4 ;


Python:


numberOfDoors = 4    OR    numDoors = 4    OR    number_of_doors = 4


Ruby:


numberOfDoors = 4;    OR    numDoors = 4;    OR    number_of_doors = 4;


Java, C#:


int numberOfDoors = 4;    OR    int numDoors = 4;    OR    int number_of_doors = 4;


Lisp:


number-of-doors := 4;


C, C++:


int intNumDrs = 4;    OR    int num_drs = 4;    OR    int int_drs = 4;


Perl:


my $vzoiuwriozufsd = 0x04;


The point here is that there are many varied ways in which the same variable can be referenced.  I am of the opinion that much along the lines of Guido van Rossum of Python (and to a lesser extent ABC) fame, that there really should be one and only one obvious way to do it.  This isn’t to say that I think everyone should code in the same language, and speak the same tongue, etc.  What it does mean though, is that to be understood by others (and sometimes by ourselves), we need consistency, and unless we have a set of strict guidelines set out for us as software engineers, developers, etc., we might as well code in our own made up dialects.  


I am of the opinion that a proper interpreter, compiler, virtual machine, etc., should be more than capable of quickly turning long variable, class, function and method names into concise tokens with small internal footprints.  So much to the point that there is no excuse for not being verbose.  At one point in time, every single byte of allocated memory for names of the aforementioned items was a crucial issue which required extreme concise naming conventions to be followed.  Those times are gone in this day and age, allowing us to be clearer and more expressive.  


I can see using single letter counter variable names, but never could I imagine naming a class, method or function in such a sparse manner.  I like to think that clean code reads somewhat like a choose your own adventure book, were it to have a greater variety of options available.  Functional or Object Oriented is immaterial here, as cleanly written code isn’t tied to a specific construct or paradigm.  I think most of the following rules are applicable to pretty much every language out there.  Emphasis below pertains to items that I feel are not language specific guidelines.


As can be seen, most of the above are applicable to languages other than Python.  I find myself at my current place of employment having to deal with the problems for which this list addresses.  Much of what I’m doing is updating a legacy code base that is literally plagued with dozens of individual programs and modules that are blatant attacks on decent code.  They (collectively) single-handedly break most of the above guidelines.  


First off it is almost entirely written in perl, which instantly shoots down the Readability counts factor (and no, it wasn’t done with the strict pragma, and yes it uses a bunch of requires and plenty of global variables).  

Secondly, errors don’t pass silently because there is no built-in exception handling in perl.  Evals of code blocks does not equate to a proper exception system, nor does an add-in module.  Exceptions are something which need to be a core part of the design of the language, and perl falls far short of the bottom of the heap on this issue alone.  


Thirdly, when one is expected to maintain code in an environment wherein the expectation is to follow the existing coding schema as it were, with global variables, no exception handling, etc., it truly becomes a daunting task because one must force his/herself to think ‘wrong’.  The logical and/or proper solution that is naturally though of as a solution would only lead to reprimand, simply because trying to think in such a manner will produce mistakes, primarily because trained seasoned professionals don’t think in the same manner as the less experienced coder(s) responsible for the legacy code int eh first place.


Finally, (I’ll leave it to three to be nice to those few perl hackers who’ve read this far), after ten plus years of coding in perl, I’ve come to learn that the TIMTOWDI (There Is More Than One Way to Do It) mantra of perl is one of the biggest problems that arise from the language.  It is this careless and dare I say reckless mindset which has led to so many atrocities in the professional coding world.  


My point is simple enough to follow.  Write readable code, as it is a defining factor as to how far you’ve matured in the field of software development.  It doesn’t necessarily mean you are even that good at what you do, but what it does do is show how you understand a rudimentary problem that so many others have failed to realise.  Readability Counts, and without it, we are truly lost.  

07 July, 2007

Java Redux. Redux.

I was perusing the internet last evening to pass the time before getting into a vicious round of Champions of Norrath : Return to Arms with my lovely wife.  I had Java on my mind for a bit of the commute home and as such decided to do a bit of googling.  For whatever reason, I decided to lookup “Java for Python Programmers" much along the lines of a great "Perl to Python Migration" book I'd acquired years back.  To my utter shock, results were actually returned.  


This whole 'ordeal' with Java has been going on with me for something over 7 years.  I started teaching myself Java way back when, but found it to be utterly too verbose for productivity, opting for perl in its place.  Then perl very quickly proved to be lacking when it came to large projects, and code cleanliness (by design mind you, I have written production code which after 7 years upon seeing it again, was very easy to follow in spite of its 7,000+ line codebase), and utter hackishness about it, regardless of the raw power.  I moved to Python both personally and then shortly thereafter, professionally where I enjoy myself most.  


However, there are certain things I've come to realise over the past many years, more so over the past few specifically.  One is that I should force myself to code in one of the behemoth languages to the point of solid fluency regardless of how dreadfully painful it can be.  Two is that most jobs are hybrid these days and require a wider set of disciplines in terms of technologies, languages and toolsets than in the past, and whilst I don't have any need for Java in my current work endeavours, it doesn't negate said need in the future.  Three is that Java makes the most sense being that C/C++ are for all purposes outside of hardware tied code (such as operating systems, device drivers, compilers), dead for application creation, period.


And so it is that I venture forth again into the wonderful realm of re-re-learning the evil behemoth formerly known as oak.  May she not be as cruel a mistress as in the past as my understandings of her workings have been greatly enhanced thanks to python sharing so many of those conceptual designs and paradigms coupled with my adoration for the latter language.  


Wish me luck.

08 May, 2007

Thinking in Lisp (with respect to Bruce Eckel)

It isn't what you might think based solely on the title of this post.  Bruce Eckel of www.mindview.net isn't coming out with yet another book prefixed with "Thinking in"...  or maybe he is.  As far as I know though, he has yet to, nor is he expected to write one on Lisp.   


On a quasi-regular basis I make the effort to learn something new in the realm of computing whether a concept, paradigm, and/or language.  I decided that given my past experience and interest (since I was considerably younger) in artificial intelligence programming concepts coupled to early leanings towards Prolog, a French born AI/logic language created around the same time as I was back in the early seventies, that it was time to return to my roots.  This time around I decided that after being an emacs junkie for so long, that the obviously choice for me this time around would be the Lisp functional programming language.  


Now the point of this post is not to go into the semantics of the Lisp language but to stress a more important point which I feel would be of greater value to any and all who might stumble across these pages.  Learning to think in Lisp changes the way you think about code logic.  I'm a fairly big proponent of OO design and programming, though I ultimately believe in using the right tool for any given job/project.  Lisp has a wonderful simplicity about it, a simplicity with a considerable amount of power behind it.  


The concept is not unlike Unix methodologies.  Simple, small programs which do one thing, but do it exceedingly well, which can then be piped to one another to do larger tasks.  Mind you this is slightly different but not by much.  Lisp works dealing with functions (and lots of parentheses).  You string together multiple simplistic functions together to produce more complex functionality.  A simple example might be finding the average of two numbers.


(defun AVERAGE (x y) (/ (+ x y) 2.0))


defun is used to define the function with the given name "AVERAGE", followed by its parameter requirements.  The actual body of said function consists of doing a division operation (/) by 2, against the results of an addition function (+) of the two provided parameter.


I feel that this example while a little simplistic does at least point out the basic mindset of Lisp programming, which still hold consistent with my above statement on its likeness to Unix shell mannerisms.  While I don't see myself coding entire systems (on a regular basis at least) in Lisp, I do have admit that I'm going to continue my studies on this language as I have been finding that my perspective has shifted thanks to learning this new and different programming paradigm, which ironically isn't new when it comes down to it.  It was just pushed aside to make way for the 'next great thing™.'


I heavily recommend some of the freely available books and information on learning Lisp and its concepts as listed below (Note: All items are PDF formatted for convenience):


Practical Common Lisp

Common Lisp: The Language

Common Lisp: A Gentle Introduction to Symbolic Computation

20 April, 2007

Simple Rapid Application Development in Python

I've always found it interesting reading about coding paradigms and what not, including ways in which a coder can increase his/her throughput. Meaning, how can I quickly pump out software that is easily portable, eloquently written, and easily maintainable by either myself and/or someone else one, two, six, eighteen months down the road? 


I've found out the answer to that question, in the form of a language, and it isn't Perl, Java, or Ruby. Simply put, it is Python by Guido van Rossum. The language that I loved to hate for so long due to what was perceived as a nasty control freak mentality regarding white space sensitivity, and the "lack" of freedom of being able to use {'s, ('s, ['s and ;'s anywhere I wanted. 


I've been using Python as mentioned previously in this blog for both large professional projects as well as certain other miscellaneous personal object-focused projects of mine and about two years ago when accepting a one-off project outside of my normal employment environment, I decided to try utilising my new favourite language for professional work. I must say that it was indeed a very simple program that I could've easily written in Perl, but no where as cleanly as in Python. The standard python libraries/classes included with every distribution (including as a stock install on my OS X 10.3 Panther equipped Apple Macintosh G3 iBook which I was using at the time) made it a clear choice (at least to attempt).


The premise of the program was amongst the most simplest of tasks. The client has a Microsoft Frontpage created website with a form. It currently points to no where because the individual doesn't know anything about capturing form data, so that's where I come in. All that is wanted is for all of the fields to be commingled into an e-mail to be fired off every time someone submits that form. He doesn't initially even want data format and/or content checking, but I inquired anyway (I'm not some code monkey who doesn't try to analyse what the non-coder *really* needs/wants/means). 


The code itself took a matter of about 15 minutes to write down, organise and test. The code is more than fifty-percent blank lines and/or comments. Using the standard smtplib and cgi libraries/classes, this turned out to be an absolute breeze. The advantage of easily stepping through the dictionary (hash) produced by the cgi.FieldStorage() method was a cinch thanks to the built-in cgi.has_key() and cgi.value() methods. 


While this is hardly an example of actual RAD, or any detailed work for a language such as Python, it does give a simple real world example of why I will continue to push for the use of this language. What I wrote worked the first time I wrote it, without any errors. I reads like pseudo-code and it was enjoyable to write because it flowed so easily from my mind into Python's very natural syntax. I used to espouse Perl for such things, but in comparison, I find it difficult to think that I held Perl in such regards for natural syntax. 


This doesn't mean that I'm a one language only person. Much of the application infrastructure I've produced at my current (and previous) employers' establishments I design and implemented in Perl on a multitude of Linux and/or FreeBSD boxes. This has changed as I've moved to a FreeBSD centric platform layout, with the intent of someday using Python as the shining star for any medium to large implementations, and let it share the small jobs with a mix of Perl and Bash scripts. 


I only wish I could get others to give Python a fair shot as it truly is one of those languages that deserve a second look, it may just changed your entire perspective on how you code. 

22 March, 2007

My Adventures in Software Engineering Consulting

  Starting in August of 2006 I ventured into the world of independent Software Engineering contracting.  Having just completed my previous salaried tenure at a financial firm, and a small side stint for a Fashion magazine as a favour to the owner(s)., I came upon a new offering.  I was hesitant at first because it was a 1099 contract job, a realm I’d never ventured into before in my professional career, and as such the time had apparently come. 


    The position was simple, the company in question was a contractor to a large retail clothier whose name rhymes with ‘Hurlington Boat Factory’ and is located in a town in New Jersey possessing a similar sounding name.  The CEO of the contracting firm requested specifically someone with considerable experience in Python who could build a real-time return transactions processing system which would utilise both XML and Oracle 10g.  While I have a strong dislike (along with many other software engineers) for XML, the reality of getting paid decent money for coding 100% in Python was all that I needed to hear.


    I have to say that I was excited not only because of the prospect of a Python pure coding environment but that I would be working initially and then periodically out of a satellite office in Cherry Hill.  This was exciting because for the first time in my decade plus career, I was finally in a scenario where I was writing code for a company whose primary purpose was producing JAVA software applications for sale.  The office in Cherry Hill consisted primarily of the CEO, a lead developer and a secondary developer.  There were several other individuals who would at times utilise the office including the owners, project managers and other associates of various roles, but ultimately it was an office with other competent coders one of those being quite the master of Cold Fusion technologies.  


    After my first few weeks on site in the Cherry Hill office it was time to start working on-site at Hurlington’s headquarters along with the only other consultant coding in Python.  This was the beginning of a very enjoyable period in the contract due to the excitement of the project and the joy and experience of worthing with another Pythonista.   


    The details of the project are much like any other project you might encounter when modelling a new project off of a customer version produced for a specific client.  It got ugly for a while due to the multiple aspects of the project including client systems which needed to be integrated for proper functioning along with an existing array of registers distributed nationwide and a database number records approach a half a billion entries.  The normal in fighting and finger pointing existed but it was all worked out in the end with a finished product delivered and a contract satisfied 100 percent. 


    The only issues encountered which left a bad taste in my mouth were those pertaining to a clueless project manager who regardless of his claim of years of experience was apparently lacking considerably outside of his realm of Oracle, which caused unnecessary attitude due to his ignorance of coding and APIs.  There were other issues dealing primarily with suits, but I doubt that this specific issues varies much anywhere.  Suits and Engineers rarely if ever mix, let alone get along except on a faux-cordial level.   The ultimate end of the contract was due to the project portion I was responsible for coming to fruition, even though I was already working on leaving regardless.   It wouldn’t have mattered much anyway given that the main contracting company is located up north in the centre of New England and are in the process of relocating everyone to that locale, an act which I am unwilling to do.


    I do like certain aspects of software consulting, but given that there is a considerable amount of extra taxes which must be held aside, some unholy hours which must be adhered to for the purposes of meeting quite strict time lines, and the reality of being a second class citizen in the work environment (or 3rd class in my case as a sub-contractor).  It all comes to an end in two days and I go back to a normal, preferred work environment in five days when I start up in a salaried position again working for a web host writing a multitude of applications and revisions of existing software, in a nice relaxed geek environment, also in New Jersey, but this time around, I’m excited to not be a consultant.   At least for the time being.