October 8, 2015

Django Magic Removal, this time for real

guitar Django Magic Removal, this time for realDespite my earlier initial successes using the Django Magic-Removal Branch, I had to roll back. The branch code was stuck in an unusable state for a couple weeks when I was really wanting to crank out some functionality on my storefront.

I’ve long since learned that when you have a strong urge to code, you should do it right then, not put it off for when it would be more “convenient”. It won’t be, and you’ll lose precious hours of probable “flow programming.” So, I rolled back and worked off the .91 codebase.

This time there’s no looking back

Because the branch is supposed to merge to the head of the tree today, I have no choice remaining. Ah well. I spent three hours last night merging my three Django apps. I’m not quite done, but all that’s left is the database API changes, and my DB calls are all well isolated.

Not only will I be “on the mainline” of the Django code, but when the code is all merged I’ll be able to use the far more intuitive new API. I’m honestly quite happy to see them break with their old API before they release the 1.0 version. That way they don’t have to support cruft, which slows down development. Possibly more importantly, they obviously have applied “lessons learned” when refactoring.

This isn’t some little change. It is “shoring up the foundation” before major new functionality is built on it. I can’t wait to see what happens next.

Up next, more ECommerce

For my part, I’m getting more involved with the Django yet-to-be-named ecommerce shopping module. It is amazing what just a few Django programmers can throw together in a few days, really a testament to the productivity of the framework.


Getting a Macbook

jump joy Getting a MacbookWhen I accepted the job at Dotster, they asked me what kind of computer I wanted, so they could have it ready for me on May 1 when I start. I paused, and said hopefully, “A Macbook?”

Yup. That’s what I’m getting. Woohoo! I use a G5 at home, but I’ve never been privileged to use a Mac at work before. I’ve been a Linux-at-work guy for six years now. I have nothing against Linux, I’m an active contributor to several Open-source projects. But, I love my Mac in a way I’ve never managed to muster for Linux desktops.

I was pleased for several reasons. Firstly, that I won’t have to break my no-Windows-at-work streak. Secondly, that they’d spend that much on a laptop for me, and thirdly that they asked. That’s a good way to start a new relationship.

I think that my favorite new-to-me program, DevonThink will really help me in my new role. I’m still exploring it and making it part of my standard usage pattern, but I can already see how it will give me a great deal of information leverage. That’s going to be crucial in this new position.

New job, new role, great new laptop. This is the most excited about my career I’ve been in years.

Best flow schedule?

hammock Best flow schedule?What is your most productive dash/break schedule? I mean, when you are at your peak “flow” level, or more likely when you are trying to evoke your flow, what schedule do you use?

I’ve been thinking about this and experimenting a bit lately. It is a tough one to optimize since there are so many variables involved.

I’ve read people suggesting 35 minutes on/5 minutes off. That doesn’t work for me for anything other than getting small stuff done. If I have a stack of things to do, all moderately related, then that schedule is pretty effective. Just put your head down and plow through, lifting for a breath every half hour or so. But it is not effective for programming or creative work.

I need a longer period to get into it. It seems to take about a half hour to get the juices flowing. Less earlier in the morning or if I am very high-energy. More after a meal, especially a heavy one.

So, watching myself over the last few months, I think my most productive periods are in spurts of two or three hours, with a half hour break between them. The break is preferably something physical and non computer related.

After two or three such productivity sprints, I need a real break. That’s when I like to play ping-pong, do some gardening, or clean the house for a while (as a last resort).

I’d love to hear what other people think works best for them.

[tags]programming sprints,productivity,break periods[/tags]

The code won't be ready…

bull2 The code won't be ready...I was in an emergency meeting recently where the company had sold a big project, based in large part on a super-duper-solves-everything process tool. This tool, this magical tool, is to be the company’s leverage for bringing in all the facets of the project on time and under budget.

Problem is, there’s no such tool. They need to write it. Ouch. There’s a project plan and a timeline. The timeline says the project will be done in June. The work on the project that the tool is supposed to facilitate needs to start now.

What do you think the brilliant idea was to solve this problem? “Can you write us something to help us do this?” No! I can’t. I mean, I could, but what you need is the mystical-magical tool you’ve spec’d. In the meantime, what you are going to need to do is to work out a clear chain of responsibility, and actually talk to each other. You’ll need to manually do the things the tool is supposed to make simple.

The great thing was, I actually told them that. Maybe it is because I’ve been laid-off that I could actually point out the foolishness of what they were asking. You need to talk to each other. You need to have a defined flow for the various stages in releasing the client’s content. I can help you by setting up a document repository using our CMS. But that’s it.

It was such a liberating moment to tell them that they are going to have to live in the hole they just dug themselves. Me, I’ll be at my next employer. The tool will never happen, and that’s why the company just had to do a mass layoff. Plenty of vision, no execution.

Mac software I use every day

cd tilted Mac software I use every dayIn the grand tradition of Daring Fireball I’m going to share my software choices. To keep it short and sweet, this time I’ll limit myself to software I use every day.

Software which is always loaded

These are the ones I almost always have running.

  • Path Finder – Finder done right.
  • Ecto – A great blogging client, which understands that I have several different blogs to update. It is easy to use and gives me exactly the right amount of power for daily use.
  • ITerm – I suppose there are some better shells, but I always end up going back to the trusty multi-tab ITerm.
  • Sciral Consistency – A new addition, this little app keeps me aware of my main tasks, and helps remind me to be “consistent” in doing them on time. It is really quite clever and effective.
  • SSH Agent – Never type your password again on your hosting accounts! I use this more than you could believe. I’m always amazed at how few people know about SSH key agents. Check them out, they are well worth the few minutes to understand.
  • Pastor – Keeps my passwords all organized and secure. I think I may be trying Yojimbo as a more full-featured replacement.
  • ITunes – I don’t know what would ever shake me loose of this killer app.
  • Quicksilver – Geeky, gorgeous, and far far superior to Spotlight for what I need most often. I hate mousing around looking for apps, I want to launch them now with a couple keystrokes. I’ve never seen anything which matches Quicksilver on any other platform. It is a true killer app.
  • Firefox – I program for Firefox, and test in IE/Win and Safari. It is the best practice, since if it works in Firefox it usually isn’t that hard to get it to work in the other two.
  • NeoOffice – Yes it is a memory hog, and it starts slower than molasses. But it works very very well as an office suite. I usually have a word processing document up, and often a spreadsheet.
  • Mail.app – Built-in, multi-account, and not ugly. It wins.

Software I use every day, as needed

  • Carbon Emacs – I am an Emacs-head. I’ve tried TextMate, but didn’t feel the love. Emacs is everything I need a programming editor to be. Plus, I actually like Lisp.
  • Endicia – I reviewed this software a month ago, and I use it every day. I cannot even begin to say how many hours it has saved me preparing shipping labels and (more importantly) allowing me to skip the post office lines.
  • Adobe ImageReady – I used to use Photoshop for everything, but Imageready is smaller for my day-to-day purposes. Mostly what I need to do is resize graphics and possibly lay in a bit of text. ImageReady is more than enough for this, and I really like the “save optimized as” command.
  • VoodooPad – A personal Wiki which is great for capturing ideas and details. I’m considering replacing it with Curio as a more usable way to integrate graphics and handle multiple projects.
  • TextWrangler – Some things aren’t worth booting Emacs, so I end up using the small, fast TextWrangler for them.

[tags]OSX Software[/tags]

Django on Rimuhosting

thumbs up Django on RimuhostingThis is just a quick post to confirm that Django does indeed work perfectly on Rimuhosting with very little effort required to set up. It is fast, it connected to my Mysql db without a peep of a complaint, and it is making me a happy developer.

Setup details

I’m using Rimu’s “MiroVPS3″ plan. It is $39 a month, less 10% for being an open-source developer. It provides 4G hard drive space, 60G bandwidth (in and out combined), and 160 MB ram.

I’m running the following “stack”:

  • Debian: I know and love Debian much more than any other Linux distro. Almost everything is installable with a simple “aptitude install whatever” command.
  • APF: firewall, set up according (mostly) to the instructions on Webhostgear. I had to tweak it for Debian, by setting “monokern=1″ and by symlinking /etc/rc.d/init.d to /etc/init.d
  • Imap/Smtp set up according to the instructions on The Perfect Rails/Debian/LightHttpd Stack article.
  • Mysql: Actually not my favorite db, but I didn’t want to convert to PostgreSQL at the moment, at least not until I’d proven my existing dev setup worked. Rimu set this up for me, since I’d requested a Django setup.
  • PIL: I need the Python imaging library, so “aptitude install python-imaging” did the trick.
  • python_mysqldb: Another simple “aptitude install python-mysqldb”
  • Apache2 with Mod_Python: Apache2 is more flexible about vhosts, and I’m going to use the heck out of them. Mod_python is the preferred deployment environment. I am not using any other mod_plugins. Rimu set this up, and I made vhosts entries based on what I read in the django documentation. The only “tricky” bit was setting up a different vhost for the media URLs. I did that one without mod_python support, to make for lighter server threads.

It is a very responsive environment. I can hardly wait to deploy some real apps on it very soon.

[tags]django,rimuhosting,debian,vps setup,python webhosting[/tags]

Django and Dreamhost – not now

stop button Django and Dreamhost   not nowArgh! I simply cannot get Django to work on Dreamhost. I hereby eat my words.

I’m really not worried about it, to be honest.

I tried for hours, and the best I got was extremely spotty results. Even the simple “hello.fcgi” directly copied from the Dreamhost Wiki only works about 30% of the time. This is not acceptable at all for a business site, obviously.

I’m not irritated, since they directly say that Django is not reliable on Dreamhost, but it is unfortunate. Instead I’m going to move up to a VPS system. On the Django mailing list, that’s the suggested arrangement, plus I really miss having root powers on “my box”, like I do at work.

If it goes well, as I am sure it will, I’m considering offering developer/starter Django accounts through my VPS as a reseller. I think I could provide that for about $10 a month. It would be very useful for others in my situation.


Why Rimuhosting is my new VPS provider

net cable Why Rimuhosting is my new VPS providerI’m decided to use Rimuhosting as my new VPS provider. In my last post, I gave a comparison table for the VPS providers that made my short list.

I really spent a long while reading and researching my choices. Please keep in mind that my priorities are almost certainly not yours. For me, Rimuhosting was definitely the best choice. Let me explain my thinking:

First, I made a “gut-level” cut.

No-Go:Anything with less than 148 megs of ram, which had (in my very subjective opinion) a lesser rep, or which had a lame website. Out: Powervps level 0 (memory), VPSLand (spotty rep), XELHosting (clueless, uniformative website), Jaguar Discovery (memory), Liquidweb (Price), Solarweb (memory, rep)

Next: I assigned points based on features.

  • Cost: 5 points for under $40-49, 10 for $30-39, 15 for $20-29.
  • Reputation: 10 points for “great” reputation, as judged by me from reading reviews on other sites.
  • OS: 5 points for Debian
  • VPS: 7 points for Xen
  • Memory: 5 points for 256 megs or better
  • Space: 2 points for 10gigs, 5 points for more
  • Panel: 5 points if included for free
  • Bandwidth: 5 points for greater than 100Gigs
  • Backups: 5 points
  • Scores:

    • Rimuhosting: 37
    • JaguarPC: 34
    • A2B2: 32
    • PowerVPS: 32
    • Hosteasier: 32
    • DEHE: 28
    • ServInt: 27


VPS Comparison Table

rackmount server VPS Comparison TableI spent hours and hours yesterday deciding on a VPS solution for my new store. Dreamhost is OK for blogs, but it just isn’t going to cut it for a business site.

I don’t need a dedicated server though. They are expensive, and complete overkill for a startup store. I’ve decided to go with a VPS, the sort-of-new bridge between shared hosting and dedicated servers.

What you get is a “virtual” server. Which is best thought of as a slice of a full server, which looks and acts like a server when you are administrating it. You have full root access, can compile and change settings as you please. It is an incredible step up from shared hosting, which you can only “trick” so far before you run into a hard wall of accessibility.

Choosing a VPS is difficult. There are a huge number of variables, such as bandwidth, disc space, operating system, reputation, uptime, price, backup solutions, level of assistance from the hosting provider, and reputation. Here’s my short list:

Selecting a VPS
Provider ServInt PowerVPS PowerVPS
Plan Name Essential Linux Webmin Power 0 Linux DA-1
Price $49.00 $24.95 $44.50
Setup $0.00
Rep Great Great Great
OS RH Fedora Core 2 Fedora Core 2
VPS Virtuozzo Virtuozzo Virtuozzo
Mem – min 256 128 256
Mem – max 1024 256 1024
Space 10 5 10
Bandwidth 200 100 150
Ips 4 2 2
Panel Plesk/cPanel Webmin DirectAdmin
Managed? Yes – full
Backups? Yes – full Yes Yes
Extra Great server specs Clientexec Clientexec
Provider VPSLand XELHosting Hosteasier
Plan Name XL-192 Plna 2 VPS-1
Price $21.99 $26.00 $35.00
Setup $0.00 $0.00
Rep Spotty 1 recc
OS Debian, Choice Debian, choice
VPS Xen Xen
Mem – min 192 256 256
Mem – max 768 8192
Space 8 8 10
Bandwidth 200 100 200
Ips 1 3
Panel +$6 DA +$5 DA
Backups? Yes
Extra Firewall Site not informative enough
Provider DEHE Rimuhosting Rimuhosting
Plan Name Starter MIROVPS2 MIROVPS3
Price $39.00 $29.00 $39.00
Setup 0
Rep Good Good
OS Debian, choice Debian, choice
VPS Xen Xen
Mem – min 256 128 160
Mem – max 1024
Space 10 4 to 8 4 to 8
Bandwidth 200 40 60
Ips 2 2 2
Panel +$5 plesk Plesk with +$10 upgrade to VPS3 Optional Plesk
Managed? Yes – full Yes Yes
Backups? Yes – nightly Yes Yes
Extra Free dynamic dns to subdomain a home system, advertises Django capability
Provider JaguarPC JaguarPC LiquidWeb
Plan Name Discovery Freedom VPS 1
Price $20.00 $40.00 $60.00
Setup $0.00
Rep Good Good Good
OS Debian, choice Debian, choice
VPS Virtuozzo Virtuozzo
Mem – min 128 256 256
Mem – max 1024
Space 10 10 20
Bandwidth Unlim Unlim 200
Ips 3 3 4
Panel No Choice Cpanel
Managed? Yes Yes Yes – full
Backups? Yes Yes Yes
Extra Fantastico, Xcontroller, Promises initial server Is delivered ‚"hardened"
Provider Solarweb A2B2
Plan Name IRC 128 256 semi managed
Price $25.00 35
Setup $0.00 0
OS Debian, choice Debian ,choice
VPS Virtuozzo
Mem – min 128 256
Mem – max 1024
Space 50% off first 30
Bandwidth 100 300
Ips 3 2
Panel (with managed) cPanel, DA, Plesk $7.50
Managed? $15.00
Extra 50% off first month, DDOS Protection Fantastico with cPanel option

(next post, my VPS selection and why)

[tags]VPS,VPS review,Rimuhosting,Servint,A2B2,PowerVPS,VPSLand,XELHosting,Hosteasier,DEHE,JaguarPC,LiquidWeb,Solarweb[/tags]

Why am I writing an ecommerce engine from scratch?

shopping cart Why am I writing an ecommerce engine from scratch?Sometimes I have to remind myself why I am writing a brand-new shopping cart system. It seems on the face of it to be an incredibly foolish thing to do.

I know.

The thing is, I am determined to use modern, systematic approaches to selling, as described in “Call to Action: Secret Formulas to Improve Online Results” (Bryan Eisenberg, Jeffery Eisenberg). I need the flexibility to experiment with the systems, I need the explicit knowledge about how my system works and why.

I cannot be held-up, waiting for the “next new release”, available “real soon now” of this critical component of my store. Also, during this experiment, I can’t sit there and grit my teeth poking at horrible, ugly PHP code, guessing and hoping that I am changing the right thing.

I was going to use Zen Cart, but its latest release has been stuck for far too long, and it can’t even do the very first experiment I want to try, which is to try not requiring registration before purchase.

I actually don’t think it will be so hard.

I’m using Django, so I’m not writing any admin pages at all. What I do write is working very quickly, and I trust it. That’s key for me. I can sit down in an evening and hammer out a new functional app.

I’ve broken down the functionality I want into manageable chunks, small apps that work together. With focus, I am usually able to put a working app together in a remarkably short time, with non-trivial functionality.

For example, I wrote my email auto-responder subscription system in just two evenings. It’s full-featured, too. It has multi-level fallback templates, and generic templates as well. With this system, I can manage an unlimited number of simultaneous email campaigns, with customized signup templates, across an equally unlimited number of domain names. It figures out everything it needs to keep the campaigns separate, and tracks all the click sources as well as abandonment rate.

Now I’m working on the catalog. I got all the model work done in just a couple hours. The templates will be built using my fallback mechanism, so any product will have a default template, but can be customized independently by product line, by product, or by hosting site. See, the apps are additive, and the system is so clean that they work together nearly seamlessly.

Next will be the cart itself, then the authorize.net gateway. Add some shell templates and some design work and I’ve got a cart system!

Yes, I am insane, but I am an insane guy who knows exactly what he wants and who cannot find it anywhere else.

[tags]django,shopping cart[/tags]