Friday, May 21, 2010

Thoughts on business and life

Well, I need to get a few thoughts down 'on paper,' so I guess this is where I'll start.

Seeing a business as a fixed entity, like a rock, is obviously incorrect. A business is alive. But is it alive like a tree? Is it like a person, with its own personality and dreams? I am thinking about a river or stream metaphor. There may be water on the brain, as it is really raining outside today.

What is a stream?

The stream bed - a static (over the short term) arrangement of dirt, rocks, and plant life, around which the stream arranges itself.

The water - a constantly renewed, but fairly consistent in terms of composition, amount of H20 and other dissolved material, travelling through a location on the way to wherever the stream goes.

The current - a set of forces combining gravity with the mass and characteristics of water, interacting with the stream bed.

A snapshot of a stream shows the water interacting with the stream bed according to the forces of the current, leading to a pattern of waves, ripples, waterfalls, eddies, areas of strong and weak flow, that together make up what we think of as a 'stream.' But as the proverb says, 'you never step into the same river twice,' even though the stream bed is recognizable (changing over a long time scale) and the water is following a similar pattern as it did the day before.

So is business like a stream? There are multiple time scales at work, and lots of different forces interacting, leading to an 'entity' that is only similar to itself over time. Customers, the marketplace, the competition, ownership, and staff can all change, but generally all of those things change over a longer time scale than hours or days, leading to the ability to approximate a business as a static entity, even though it is changing.

I was trying to understand time scales in chemistry class in university, and the professor made a good point. Monkeys swinging from tree to tree do not take into account the fact that the tree is growing. The difference in time scales allow the monkey to ignore the growth in the tree.

So a business is a changing collection of materials, forces, and people, that only maintains its identity because most of the factors that influence it are changing on a timescale much longer than the human scale of tasks, projects, hours and days. So a business as an entity is an artificial construct, but it is a useful approximation, since we can act in relation to that construct and it will react somewhat predictably. Understanding the business at any time will allow one to interact with the business (as an employee, an owner, a customer or client, a competitor) until the slow changes occuring within the business make ones understanding obsolete.

I am in the business of business process management, which is akin to redirecting a stream bed so that the water flows in some useful way. My son was just outside in the rain, digging channels so that the puddles developing in our gravel and mud driveway would drain into the surrounding trees. Businesses need to be aware of the forces within themselves. Rearranging some forces or environmental factors may lead to increased productivity, or may lead to a whole new identity for the business.

This post may need some editing, but it is good to at least get these ideas down so that I can develop them based on something concrete.

Posted by Dave at 2:17 PM : Comments
Categories: Business

Thursday, March 11, 2010

More Symfony, thoughts on PHP

Just finished my 4th day of the Symfony tutorial. It does pack quite a bit into a one-hour (supposedly) lesson, and if you cut'n'paste the code from the web page, things move pretty quick. But it looks like a pretty well-designed project layout, with lots of small folders so that things are put in the right place, and lots of convention-over-configuration. I'll keep at this, get through the tutorial, and maybe I'll write that music management app I've been thinking about once I get a handle on this.

I actually touched some php today. As a long-time Perl bigot, I wasn't sure I'd like it, but if you think of it as crippled, purpose-built web perl, it seems okay. Perl 6 is still not here, so I'll live with what I have access to on the server (as I said yesterday).

Now for some Magento, then I have to prepare for a real-life interruption - a ski trip, just when I was generating some momentum with this coding stuff. I'll bring the MacBookPro, and we'll see how much bandwidth (and time) I get on the mountains (Fairmont, BC).

Posted by Dave at 1:32 PM : Comments
Categories: Software

Wednesday, March 10, 2010

PHP, Symfony, Magento

Welcome back to all of you who have missed me for the past 11 months :-)

I have done a few things - my house is now liveable (in the basement), and I have a GST # and a few clients. I am now working on a couple of proposed projects - I need to spend some time up front so that I have a demo to show them.

1) Magento - a free (to start with) e-commerce php package. Setting up at http://www.northcreek.ca/store, this will be a development web store. We'll see how far Magento can go.

2) Symfony - a PHP library that helps build web apps quickly and cleanly. I want to build a music management app for Onoway Baptist Church, where I am the worship leader, and possibly soon the webmaster. Symfony gives me a good starting point.

So why PHP? Well, I have a hosted server with GoDaddy (that you are reading this on), and they support PHP, not perl, java, ruby, or others. No root access. So I'll go as far as I can with this setup, then move to a java-supported server setup when required. In the meantime, I've installed the Entropy.ch php package from Marc Lyanage (www.entropy.ch) on my laptop, so that I can develop using php and mysql at home.

I will try to keep things updated - I'm currently on Day 3 of the Symfony trial. Lots of configuration headaches due to my laptop. However, with very little description of a model, I now have a database and a website that edits the database. Hooray for modern web frameworks, even in PHP! :-)

Posted by Dave at 3:51 PM : Comments
Categories: Software

Wednesday, April 08, 2009

Agile Software Development

So it's been a while since I updated this. It's time for another book report.
I've been working through Agile Software Development, by Robert C. (Uncle Bob) Martin, of Object Mentor, Inc. This is not his latest work, and it was a long time in the oven as it was, so the book is somewhat dated. A couple of the larger examples are in C++ (which in on my backburner for now) and were written before Agile, XP, or Test-Driven Development.
But the beginning of the book is solid - the Principles on which he measures "good" OO software, and the Practices (Agile, mostly XP) that help to create it. This stuff is kind of like normalizing a data structure - the really good DBAs know how to normalize anything, but often don't in order to optimize something besides the remote chance that data could be duplicated and then corrupted. Uncle Bob knows how to write "perfect" OO software, but then tempers those design goals with the real world of performance and maintenance. He is not lazy, and doesn't encourage laziness. Instead, he points out the trade-off of code complexity vs. great design, and chooses simplicity more often than not.
I have a feeling that this book will bang around in my head quite a bit as I write code, and as I go on to teach others to write code.
Recommended, but not my highest recommendation yet. Looking forward to the next one of his that I have: "Clean Code."
In the meantime, I have started The Art of Agile Development, by James Shore and Shane Warden. Too bad I don't work at or for a F1000 company - this stuff is excellent, but too often irrelevant for just little old me.
Updates on GUIs and Frameworks in the next post.
Posted by Dave at 5:21 PM : Comments
Categories: Books

Thursday, March 19, 2009

Registered with Elance

I spent this morning registering with Elance, an online virtual outsourcing broker. I think this is a positive step for North Creek. Most of the jobs on Elance are bite-sized, and I can build up my portfolio (from nothing) with a few well-done jobs (and develop a set of references for the business, not just for David Block, employee).
In filling out the profile, I discovered some things about myself. I am not too confident in delivering a beautiful, dynamic, functional website (using PHP and some CMS), but I am ready to compete on requirements gathering, architecture, design, data modelling, and back-end coding. So that is where I can make some money, and then as I develop a better toolset for graphical front ends (whether desktop or web), I can start competing in that space as well.
My goals are crystallizing for North Creek's architecture. I want to write nothing from scratch after a job has been won - even for the detailed customizations that every client will expect. I want to build a suite of generic applications that can be quickly modified to meet the needs of my client base. My goal is 18 hour turnaround - if you tell me in a morning meeting what you would like to see, I want to be able to provide a working demo (not a hack) by the next morning meeting. This provides me with a framework around which to make architectural choices.
In a surprise move, I am quite seriously considering learning C++. I now have two books (one on generic C++, one on building with Qt), and have downloaded the relevant frameworks from Qt that will allow me to write serious applications for multiple environments. I have spent my entire working life with multi-tier environments, but that doesn't seem to be a big factor in small businesses, so this evolution seems to make sense. I will keep this blog updated as I progress and make more choices.
Posted by Dave at 2:07 PM : Comments
Edited on: Thursday, March 19, 2009 2:10 PM
Categories: Business, Software

Thursday, February 19, 2009

Book Review: The Pragmatic Programmer

Well, I don't expect these to be comprehensive reviews, but just a few notes about the books I have finished.

I have begun a regimen where I read a chapter out of a book every day. This keeps a constant velocity, and lets me get through books that have been on my shelf for years. I have enough varying interests that I am reading 4 book chapters/day. This takes some time away from coding right now, but I am learning so much that I accept the cost. Eventually I will get disciplined enough to do my reading in the early morning, before the world awakes. I expect that will be later, though, when the log house is complete and I can stumble over to my office and sit in a comfortable chair.

The Pragmatic Programmer was written in 1999 by Dave Thomas and Andy Hunt. It has stood the test of time, mostly because it avoids too much specific technology and focuses on the principles of effective programming. I can see the influence of this book in the book I'm working on now, "Agile Software Development: Principles, Patterns, and Practices" by Robert Martin. "Pragmatic" has become a code word and has been branded as such in the industry. The "Pragmatic" authors have taken their own advice and started learning a new language every year, which is profitable for them, since they often get to write the book about said new language. They jumped on Ruby fairly early, if I recall. It makes sense: this book has a lot of Perl in it, and Perl is so 20th Century.

Metaprogramming is a big deal for them - getting scripts to write code. This has become standard in the industry, and .Net and Java annotations do this as part of their internal structure. However, that, and DRY (don't repeat yourself) are the big takeaways from this book.

They are fumbling about the agile way, but XP was just being articulated at the time, so things like Unit Testing and short iterations were still somewhat controversial. Now they are not controversial, just not done in practice. Hmmm.

Don't Repeat Yourself is a huge deal. If I could get my code to that level, I'd be ecstatic. Redundancy is a real enemy. It is the one thing that killed EJBs, I think. Spring is just so much more terse. It is also the reason I don't like Hibernate. I have a database schema that already exists; I don't want to repeat it in awkward XML. I also don't want to give a single application power over a database schema - often the data is much longer-lived than the application. So I want to work from the data out. That's what led me to the design for DBDB.

Getting good at an editor! What a good idea! I used to think in Emacs keystrokes, but I've been away from coding for long enough that the Mac way is more natural now. I don't know if that will stay, or if I'll get back to Emacs, which has so much more power available without lifting my fingers off of the keyboard. With this laptop, I have a touchpad not too far away, which makes things somewhat easier, but still, keeping the fingers on the home row is definitely a win overall.

I really appreciate the wisdom in "The Pragmatic Programmer," but I am nowhere near that level yet. I will keep working towards it - it feels like I may have to put this one in a rotation, and read it again in a year or so, to keep the target in front of me.

In the meantime, I have plenty of other books in front of me.

What did you think of "The Pragmatic Programmer?" What, you haven't read it yet? Or are you like I was, and felt so guilty about how you actually work that you never finished it?

Posted by Dave at 10:43 AM : Comments
Edited on: Thursday, February 19, 2009 10:46 AM
Categories: Books, Software

Wednesday, February 18, 2009

Coding Options

I have discovered that I have been away from coding for a while! My last coding assignment was with EDS(www.eds.com, now a unit of HP), working on an existing codebase that dealt with a mixed Oracle/mainframe backend, with a Java servlet/JSP front end (http://travis.gov.ab.ca). This was a familiar environment, since I worked on similar systems at Novartis (www.gnf.org) and the University of Alberta Human Metabolome Database Project (metabolomics.ca). However, my work at EDS transitioned into Business Analysis, including a lengthy stint as a facilitator for a large-scale Smart Card implementation. While I was gone, the world changed!

The world has experimented with web user interfaces (UIs), and has found them wanting. In their place, the Rich Web has gained prominence. This primarily has meant AJAX, and in practice, the Google Web Toolkit along with other offerings. Adobe has introduced Adobe AIR, which allows cross-platform desktop development based on Flash. And the rise of the Mac platform to relevance has re-invigorated cross-platform library solutions, such as Qt, a unit of Nokia, which provides Java and C++ development environments that can be targeted at almost any platform, including Linux, Mac, Windows, and many smart phones.

So I want to develop custom, easily modified business software. So do millions (?) of other developers. I hope that my choice of technology gives me a business advantage. Of course, my primary business advantage is that I will start by creating a relationship with my clients, and then will meet their perceived and actual needs. This means that my choice of platform must allow me to fulfill those needs within a cost and time structure that allows me to be profitable.

So, what do I do? Here are some major factors in my decision-making process (which has not finished yet!):
1) Run on desktop vs. remote server: Do I set up a server and allow my clients to log in to the server? Or do I send a complete solution to the client desktop, including a persistence solution and all business logic?
My experience and my instincts suggest that if I can control the server, I can improve the experience for the client without the pain of an upgrade process. This should allow me to iterate rapidly towards a really good product.
2) Web client vs. Rich client: Should the user interface be compiled to run on the local machine, or should it be mediated by one of several possible browsers, over an uncertain network connection? This seems to be somewhat of a false dichotomy, as long as the client has decent bandwidth. With my choice of a server backend in #1, the bandwidth seems to be required. Can a solution such as GWT support enough functionality to make the browser "disappear?" Or would a Java client offer enough speed and interactivity to make the browser interface seem clunky? Perhaps I should let Qt provide the UI framework, and write once, test everywhere?
3) Client hosting of data: Will the clients be comfortable with their private business data in the "cloud," or should I sell them on local appliances that host their solution on their local intranet (which means in many cases, setting up an intranet)?
The low cost of desktop hardware leads me towards this second option, where I build and configure a server that hosts the persistent data and the application, which is served to the client desktop (through something like Java Web Start, or through GWT, or Adobe AIR). This allows me to set up backup schemes and encryption to reassure the client of the security of their data, and gives me a single upgrade point per client.

Given the explosion of virtual server environments available, I believe this progression of questions and answers will lead me to develop a standard appliance that can be easily loaded into a commodity PC. This appliance will host the applications required by the client, while the data will be stored on the PC outside of the appliance, allowing for quick swapping of images when I wish to push out an upgrade or bugfix, without touching the client data.

I have a lot of experience with MySQL, and combined with its price point (free!), I plan to stick with it for now (while watching PostGres et al). Combining MySQL with a JVM and a servlet container (Tomcat? Jetty? Jboss? I'll decide later... the joy of standards) gives me a comfortable backend. Now, developing on the front end for the JVM has gotten interesting, and that's where I'm still experimenting. GWT? AIR? I will probably pass on AIR for now, as its advantages are pretty small compared to the other options, and there is a small upfront cost involved. I'm still happiest with free tools.

I am taking a good long look at Qt, and its Java implementation, Qt Jambi. That combination gives me a near-native front end (from C++ compiled into native code) combined with Java (which I actually have worked in before). If it's not dynamic enough (more on that in a later post), I will probably invest some time in GWT, and then fall back to HTML+javascript as a last resort (but the one I actually know how to do now).

Suggestions?
Posted by Dave at 1:45 PM : Comments
Edited on: Wednesday, February 18, 2009 1:52 PM
Categories: Business, Methodology, Software

Monday, February 09, 2009

A little progress

Well, a bit of an update.

I'm coaching a basketball team (my son's Grade 7 team), which takes up some brain space on Mondays (practice) and Wednesday or Thursday (games). They are just beginners, but that's fine, so am I :-)

So today I just got started on a database schema, and then had to plan my offense. The practice went okay, but the kids need way more repetition before they do the offense naturally. So hopefully they at least have fun.

My database schema - very basic:


  mysql> show tables;
  +----------------------+
  | Tables_in_northcreek |
  +----------------------+
  | event                |
  | participant          |
  | party                |
  | time                 |
  | type                 |
  +----------------------+
  

These tables will be the start of a generic framework that allows me to create business applications using metadata rather than code. At least that's the plan. I need a template system for the UI (View), a workflow system for the Controller, and an extensible, Universal data model for the Model. My goal is 1 day turnaround from requirements to prototype. So Monday requirements meeting with a client, Wednesday demo of those requirements in a production app.

If I can get this to work, then I should be able to undercut commercial business accounting software and still make money on support contracts. But we're a ways from having a Quickbooks feature set. That's the target, though.

I may use Qt as the development framework - cross-platform development including smart phones and Java. It depends on if I can figure out how to template a dynamic UI that runs off of metadata. I know I can do that using web technologies, but that introduces servers and browsers, etc., which is not all bad, but might be overkill for a small office.

I've also downloaded Scala to play around with - the alpha geeks have given it a thumbs up, and it runs in the JVM, so I can integrate it with everything else out there (including Spring). I'll keep this blog posted - I just completed a Hello World app that actually ran in Eclipse :-)

Bedtime for the kids. Out.

Posted by Dave at 8:32 PM : Comments
Edited on: Tuesday, February 10, 2009 2:21 PM
Categories: Business, Software

Friday, February 06, 2009

Comments!

So I'm attempting to install a commenting system - hope to hear from some visitors!

We'll see if it works.

I am using blogtools, which hosts the comments and just requires me to update my templates (well, Thingamablog's templates) to pop up a comment window.

Doesn't seem to be working yet - I will update soon.

Another attempt? YES!!! I plan to always celebrate little successes like this one - maybe by breaking for lunch :-)

Posted by Dave at 11:55 AM : Comments
Edited on: Friday, February 06, 2009 12:17 PM
Categories: Software

Blogging with Thingamablog

I spent most of yesterday looking for a free desktop blogging client that doesn't rely on a blogging API to post. I have a hosted domain with GoDaddy (northcreek.ca) and I just want to ftp a rendered blog entry up to the host, without a lot of complicated installs (mysql, wordpress, etc.). I was using Radio Userland, but it seems to be abandonware (Dave Winer, I know you're busy, but Radio breaks my Mac!). I rebooted about 10 times yesterday, when usually I reboot only on Software Updates.

I looked around at Google's suggestions, and ended up with Thingamablog. This is a Java application that does exactly what I need. The only problem was that it was a .jar file with a bunch of associated lib jars, nothing like a Mac application. Apple has done a good job of making Java apps look "close enough" to real Mac apps that I can deal with the strange icons, etc., but I wanted a double-clickable .app bundle that I could move around.

So I made one! I got a lot of help from a bunch of websites that pointed out the basics, and I wouldn't want to rely on this app being distributed like this, but it seems to work so far.

I'll stick with this until (a) I find something better, also for free, or (b) I write my own. Of course, Thingamablog is free (GPL), so I can always pick up the source code and make it better.

I cut'n'pasted an icon from the splash screen - I am not a graphic artist! - but let's see how Thingamablog does with images:

Splash Screen:

Thingamablog Logo  

New Thingamablog Icon:

Thingamablog Icon  

And there we go!

Posted by Dave at 11:28 AM : Comments
Edited on: Friday, February 06, 2009 12:05 PM
Categories: Software