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).
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! :-)
Thursday, March 19, 2009
Registered with Elance
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?
Wednesday, February 18, 2009
Coding Options
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.
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.
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 :-)
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:
New Thingamablog Icon:
And there we go!
Thursday, February 05, 2009
Introduction
Welcome to the North Creek Blog. This will be a record of the creation of a new software development company in northern Alberta.
My name is David Block. I am starting the company I would like to work for (Thanks for the idea, Joel). It will use agile, Test-Driven Development, and it will assemble Open-Source tools and libraries to create custom applications for small businesses that have the capabilities of much larger, more expensive commercial software. I plan to stand on the shoulders of many other giants, and see what comes of the process.
I have a few ideas of my own. I like working off of a real database engine, so I will start with a general database schema that will store most of the nouns in the program. Then, I will build a workflow solution on top of that schema that thinks in terms of verbs. The verbs will lead to the dynamic generation of the interface needed.
I have a library of database interaction code that I have developed over several previous projects, for different employers. The latest name for it is DBDB. I will use it as the ORM for my application. It is very lightweight, and requires very little maintenance to adapt to dynamic database schemas. I don't like maintaining a big xml file - flashbacks to J2EE.
I will also use a lot of Spring for setting up the project.
I will try to post reviews of useful books, projects, and libraries as I try them out.
Currently, I'm trying to read some of the books that have been sitting on my shelf for a while: JUnit Recipes, The Pragmatic Programmer, and Uncle Bob's Agile Software Development. Now I have to try to apply those principles as a small business owner, working on my own.
Hopefully I'll see you around.