Yeah... I've Been Hiding Out...
Saturday, February 13, 2010 - 7:21 PMYea, I sort of quit blogging the last few months. Not because I don't have anything to write about or that I think it's a waste of time. Even if it was a waste of time, the real issue is I haven't had much of just that... uh, time that is. No time.
I have a list of blog post ideas in my iPhone that I just haven't had time to write them up. I also have a list of like 4 or 5 products that I think would sell really well but just no time to put them together.
Plus, I have some other business needs that are taking up most of my time right now. One of them is CartFreak, which is a "super-human" shopping cart aimed at direct response internet marketers. Check it out if you're in the market for a cart to help automate your business. You'll see the feature list compares (even beats?) most of the major carts out there.
I've also been spending a lot of time consulting with clients on marketing their websites, improving their customer retention, etc. While I love helping small businesses out, I am starting to see that it's cutting way to much into my time and it's effecting my real business goals.
So that said, here are my plans for 2010:
Restructure My Entire Business Around CartFreak
As it stands right now, CartFreak is my main focus and I want to turn it into a huge success. My partner on this project is Joe Lavery, who is an amazing marketer. This guy lives and breaths marketing. The "crazy" ideas he comes up with never stop blowing my mind... Not because their crazy, but because they WORK!
Ok, enough stroking Joe ;) We are both working really hard to help turn CartFreak into a real competitor to the larger "old" cart companies out there. We have quite a few people paying us to use the software already, and it's only in beta release. We've also had such positive feedback from big name marketers on the cart and that has been very motivating and helping us keep our focus.
Stop Consulting With Small Businesses
As much as I love helping small businesses improve their internet marketing, it's time for me to ween myself away from doing so. The reason being is that it's way to time consuming. With clients all over southern California, I find myself traveling to meet with them several times a month and each time I lose a few days in the process.
I'm still going to help out my clients, and other small businesses, just in a different fashion. I have a product in the works that will be very useful to these type of businesses and much more affordable than paying me to personally come out and meet with them so often.
Helping the "Little Guy"
Even though I, myself, am a little guy, I still have a lot to offer people new to internet marketing and process automation. I have a small, but very loyal, following and I appreciate them very much. I want to spend more of my time giving back to them - my customers!
I've got some awesome stuff in the works for them and hope to be able to start with that really soon. Note, if you want to be kept up to date on this, click here and enter your email address.
Focus on Business Automation
As a software developer, I thrive on automation. The lifeblood of my business is getting a computer to do the things that I would normally have to do. In the last year I've sort of lost track of this and honestly, been completely neglecting it. Not because of laziness, but I come back to the lack of spare time.
So I will definitely be focusing more on automating (or outsourcing) as much of my business as possible.
Do Some Software Contracting
I love writing software using Python and Django. The "geek" in me won't let it go, so assuming I can find the time I'd love to pickup some short term contracts writing software on a cool project. This wouldn't even be for the money, but more for the "fun." As odd as it sounds, writing code is almost therapeutic for me.
Write More Open Source Software
I love open source software. A lot of people don't realize this but the vast majority of internet services run on open source (FREE) software. Everything from web servers to mail servers to name servers. The very services that are the backbone of the internet, all come from people to write software and literally give it to the world.
I recently released the Zerigo DNS Python module to the open source world. I've also been submitting patches and code changes to other projects I am interested in. I want to do more of this, when I have some spare time or am in the "zone" and just want to "code"
Try To Improve My Personal Life
This is hands down the most important part of my plans for the future...
Things in my personal life have been sort of out of whack lately and I have a lot of changes coming in the very near future. Some of them are very hard for me to deal with, but like always, I will have to suck it up and move forward. Like my ARMY drill sergeants used to say - FIDO - which stands for "Fuck It, Drive On." So that's exactly what I plan on doing.
At the same time, I need to create some sort of balance. I work way to much and everything else in my life has suffered a little bit because of it. Especially my relationship with my 2 daughters. When my 10 year old tells me she doesn't get enough "quality time" with me, then something is wrong and MUST change immediately. So that's exactly what I'm doing. Making changes in the right direction.
Wrap Up
This turned into a way longer post than I planned on. Guess I had a lot of writing in me to get out ;)
Even though I will never shut down this blog, and I do want to write more here, I know I won't get to write as often as I like. Just stay subscribed (either via RSS or email) and I'll update you as things progress.
If you really wanna know what I'm up to during the day, then follow me on twitter. I update throughout the day, usually every day, there.
Here's to a great 2010!
Django 1.0 Released!!
Thursday, September 4, 2008 - 9:46 AMWow, Django has finally released version 1.0 of it's framework. I've been using Django for around 18 months now and have written about it many times in the past. There have many so many improvements to the framework since I started using it. If you want to create a powerful website quickly, Django is such an awesome framework to build from. Since it's pure Python it makes writing fast code such a breeze.
Anyways, I just wanted to say congrats to the entire Django team and user base. This is a big milestone for all of us.
Technorati Tags: development, django, new release, python
Geek or Marketer or What The ...
Wednesday, August 13, 2008 - 9:57 PMI've been wondering lately if I am alienating myself from my readers by covering many different topics on this blog. My posts range from software development to money management to internet marketing. It's hard to build up a dedicated readership when my topics don't seem to stay on any certain topic ;)
So should I stick to a single topic? I don't think so. This is a personal blog and it should reflect the things that interest me or the events going on in my life right now. That is why I will write an article on how I created the software that runs this blog to an article on how to increase your website conversions.
To me, being able to use many different skills to earn a living online is very useful information. In the end, this blog is not designed or intended for me to make money off of. Just an outlet for me and a way to get my ideas out there.
Love it or hate it...
Technorati Tags: blog, development, internet marketing, marketing, software
Up Your Profits With Google Checkout
Monday, January 28, 2008 - 11:58 AMI, like many, have been frustrated with Paypal the last few years. Their policy is a little one sided and it's the merchant who gets the short end of the stick. I know I am not the only one who has had their entire account locked—with all funds frozen—as a result of a single complaint from a buyer. I slowly took my payment processing to other venues and basically only use Paypal for eBay purchases now.
How are we supposed to process orders without a payment processing partner? There are many options out there that are suitable for selling goods (digital or not) online. If you want to go all out you can get a merchant account and setup an account with a gateway processor, such as Authorize.net or USAePay. That is a little extreme for most of us, especially those sites that are only selling a digital product (eBook, spreadsheet, etc.)
ClickBank is a very popular alternative for people who are selling eBooks online. I am one of those odd people who has never used ClickBank before so I don't have a real opinion on them. The people I know who use it say it's a decent system that they don't have too many complaints about. One thing I don't like about it though, is the $50 account setup fee. That's one of those things that makes me go Hmmmmm...
The option that is getting more and more popular is Google Checkout. I have been working with Google Checkout the last few months and honestly haven't had many issues. It does require a little more work on the merchant's part if you are selling digital goods. Basically you need to have a script running somewhere to process orders on your end and automatically email out the download information for your product.
It's software integration ability makes Paypal's look like childs play. Since I am also a programmer, I have been working on a system to automate my side of the Checkout purchases. I have been using gchecky module (written in Python) for my development and it's been a breeze to work with. There are also multiple libraries that you can use for your own development. Maybe once I am done with my system I will give away a free, smaller, version of it for all of you out there.
Google dispute policy is much more neutral than Paypal & others. The few times I have had to deal with it they have been fair to both sides and resolved the dispute accordingly. I have a friend who charges 5-10K a day using Google Checkout and since Google does a lot of the verification work, his charge backs have nearly disappeared!
If you are looking for an alternative to Paypal, try out Google Checkout! I don't think you'll regret it.
Technorati Tags: click bank, development, google checkout, marketing, paypal, python
AhCabron.com - Now Powered By Django!
Monday, October 8, 2007 - 8:52 AMAhCabron is a very NSFW website that I have worked on and off on for years. The name "Ah Cabron" (spanish) basically translates into "You Ass!". I know the owner and am more than happy to help him out when I can. I have helped with engineering and development in the past and am sort of the "go to guy" when technical issues arise. Certainly I present a bill for my services; after all... we are not Communists. <insert laughter here> (Sorry, Godfather moment..)
Little history... The site started so people can upload images of their boyfriends/girlfriends and get feedback on their looks. It was originally run using the open source coppermine gallery software. It quickly turned into people uploading adult natured images and soon it was 99% adult only content being submitted. Not one to turn away perfectly good images, the owner kept up with it.
Soon he realized that coppermine was too limited for the changes he wanted to make. That's when I entered the picture. I originally wrote a brand new system from scratch using Python and Mod Python. It was a basic system using the mod_python.publisher, mod_python.psp system for templates and my own sql wrapper for database access. For about 2 years this software has been running the site and doing a great job. It has been a bit of a hit, as it pulls in over 8M page views per month which is respectable traffic.
The time had come how ever to take the site to the next level. For that, I knew I had to rebuild this thing from scratch. Since I am now a Django groupie, I of course rebuilt the software using it. In all I would say it took me about 13 hours total to rebuild this site or about 2 weeks giving time when I had it. Most of those 13 hours was spent writing data migration scripts from the old schema to the new Django model schema. With heavy use of generic views the site was put together extremely fast. I should mention that a lot of the back end code I reused from other projects I have worked on (ex: image processing, watermarks, Amazon S3 integration, etc).
As of now the new code is basically a replication of the old site. All the old features are there and I wanted to cut that over now and flush out any bugs before I continue with the list of new features that are coming down the pipe. Video, RSS Feeds on just about anything, full user profiles and slide shows are just a few of the features on my ToDo list.
Check out the site, and pass me some feedback!
Technorati Tags: ahcabron, development, django, nsfw, python
PostgreSQL Wrapper Using Python And PyGreSQL
Friday, September 14, 2007 - 5:47 PMEver wanted a nice, clean or sexy interface when working with Python and PostgreSQL? You're in luck, I happen to own one. I wrote this a year or so ago and it's been through some changes but overall it works very well. It is in use over at AhCabron (NSFW) and has been performing great for the site, which pulls 8M+ page views per month (I know, that's not a HUGE amount of traffic, but it's respectable).
Of course, for web work with Python I strongly recommend Django! But there are still plenty of other reasons why you need to hit a db outside of Django. That's where my module comes in.
It uses the PyGreSQL PostgresSQL module. This is the actual glue for Python to PostgreSQL. My module is what makes your programming super simple. So here it is, I am releasing it to the wild and under the BSD License. Do with it what you will.. Download it here
Here is an example of how to use it.. Very simple.
from sql import *try:
sql = PgSQL('dbuser', 'dbpass', 'dbhost', 'dbport')
sql.Connect('dbname')query = 'SELECT * FROM table WHERE "foo"=\'?\' and "bar"=\'?\''
sql.Prepare(query, (var1, var2)) # Prepare takes 2 items only. a query and a tuple (or single object)
sql.Execute()for x in xrange(sql.rows):
print sql.data[x][0] # Column count heresql.Close()
except SQLError, err:
print 'Caught err: %s' % (err)
Pretty self explanatory. If you have questions, check out the source. It's not a large module and pretty easy to follow. If you still have issues, feel free to email me. Upon any error, the exception it will raise is SQLError. I thought about adding more specific exceptions, but in the end, is it really necessary?
So there you go. Enjoy!
Technorati Tags: development, postgresql, programming, pygresql, python
Django + Flatpages = WTF?
Sunday, August 19, 2007 - 8:53 AMOK, the title is a little misleading. I love the flatpages. I recently deployed them on this blog for the about and contact pages and they were working fine. This morning I noticed that they were raising a 404 (Page Not Found) error. That's where my "WTF" in the title comes in. Here is a check list to solve this flatpage issue.
- Add the middleware and app as directed on the flatpages documentation page.
- Make sure you have the correct SITE_ID in settings.py and make sure the flatpage is assigned to that site.
- Check that you have flatpages/default.html in one of your template paths.
- Verify that your default.html template is extending the correct base template
Number 4 was my problem. I have been working on the code to allow multiple template sets to be selected in the admin interface. In doing that, I re-factored the base layout to be in template/base/base.html but the default.html was still extending base_blog.html. Doh!
I wish there was something logged somewhere though that would let me know there was an error rendering the flatpage. The 404 was pretty cryptic.
Technorati Tags: django, blog, python, 404, development
Ping Technorati from your Django App
Saturday, July 14, 2007 - 9:39 AMThere are other articles written about this, but I felt the need to write a better one. Ahem.
Meat and potatoes time.
In your settings.py file, set 2 new variables:
# 'PING' blog indexing sites.
PING_BLOG_INDEX = True# List of blog index ping URL's
BLOG_INDEX = ['http://rpc.technorati.com/rpc/ping',
'http://blogsearch.google.com/ping/RPC2',
'http://rpc.weblogs.com/RPC2']
PING_BLOG_INDEX is self explanatory. BLOG_INDEX is a list of blog XMLRPC url's that this application is going to use to notify the remote website (blog indexer) that your blog has been updated.
Let's create a new file in your blog application directory and name it ping.py. This file will hold the code that actually pings the blog indexers. Here it is:
from django.conf import settingsdef pingSites(entry, blog_name):
for site in settings.BLOG_INDEX:
try:
rpc = xmlrpclib.Server(site)
try:
p = rpc.weblogUpdates.extendedPing(blog_name,
settings.SITE_URL,
entry.get_absolute_url(),
settings.SITE_URL + '/feeds/rss2'
)
except:
# May not support extendedPing()
# Try normal ping
p = rpc.weblogUpdates.ping(blog_name,
settings.SITE_URL)if p.has_key('flerror') and p['flerror'] == True:
errlog(p['message'])
except:
errlog('pingSites: %s, exception!' % (site))
A few notes on the above code:
- errlog() is a function I have that just logs errors via syslog for my review. If you don't want to track the errors then a simple "pass" will do. I am just anal about errors and like to follow them. Heh, I said anal.
- This code assumes 2 things. One is that you have a "SITE_URL" option in your settings.py file. It should just be something like "SITE_URL = 'http://www.petersanchez.com'". And two is that your "Entry" model (the model that stores your blog posts) has a "get_absolute_url()" method. If it currently doesn't, I have to ask: What's wrong with you? Add one!
- You probably need to change the '/feeds/rss2' line to match the URL for your own RSS feed. Don't have an RSS feed on your blog yet? Write one, its super simple. Doc's are here.
Now lets edit your blogs models.py file be sure to import the pingSites() function that we just created in ping.py.
from your_project.blog.ping import pingSites
In your "Entry" model (mine is named "Entry", your mileage may vary) create a custom save() function.
def save(self):
# Save first, ping second (if configured)
super(Entry, self).save()
if settings.PING_BLOG_INDEX:
blog = Blog.objects.all()[0]
pingSites(self, blog.name)
Notes on above code:
- The 'blog' variable used in my example is because the software I wrote supports multiple blogs from a single installation. If you don't have a similar setup, just remove the "blog = Blog...." line and replace "blog.name" with the name of your blog. For example: pingSites(self, 'Joe Blow Blog')
That's it. You should be good to go. Next time you update your blog the blogosphere will immediately know about it via the blog indexers.
Technorati Tags: blog, development, django, geek, python
Django, metaWeblog and Amazon S3
Wednesday, June 6, 2007 - 11:11 AMThis is a quick write up about adding support for Amazon S3 to your Django weblog. I added support for metaWeblog API by using the this write up from All Your Pixel. Most, if not all, blogging clients support the metaWeblog API so I think it was a good choice.
Why use Amazon S3?
- It's super cheap (probably cost you less than $1/mo)
- Performance is improved by moving static media away from your Django/Apache instance.
- Amazon worries about managing and scaling the storage back end.
First off, let's edit the settings.py that is in your Django project's directory. We will want to add your Amazon access information. Note: You can get your access information by signing up for S3 at the Amazon site. Add the following to your settings.py file:
AWS_ACCESS_KEY = 'Your Key'
AWS_SECRET_ACCESS_KEY = 'Your Secret Key'
BUCKET_NAME = 'Your Bucket Name'
AWS_S3_URL = 'http://s3.amazonaws.com'
So, I am going to assume you are using the xmlrpc.py and metaweblog.py that was provided in the All Your Pixel posting (linked above). Be sure you are importing the Django project settings file by using:
from django.conf import settings
This will also require the Python S3 module that is provided by Amazon. Get this file and add it to your project, or your Python path. Import that module, and the mimetypes module which is used to guess the type of the file being uploaded.
from yourproject import S3
import mimetypes
Now we will create, or edit, the metaWeblog_newMediaObject method. This is what is called when your blogging client attaches, or uploads, a media file to your blog post.
def metaWeblog_newMediaObject(user, blogid, struct):
ret = {}
fext = os.path.splitext(struct['name'])[1].lower()
fname = generate_fname() + fext
try:
conn = S3.AWSAuthConnection(settings.AWS_ACCESS_KEY,
settings.AWS_SECRET_ACCESS_KEY)
buckets = conn.list_all_my_buckets()
if not settings.BUCKET_NAME in [b.name for b in buckets.entries]:
# BUCKET_NAME doesn't exist, create it!
res = conn.create_bucket(settings.BUCKET_NAME)
if res.http_response.status != 200:
raise
filename = 'uploads/' + fname
res = conn.get(settings.BUCKET_NAME, filename)
while res.http_response.status == 200:
# File exists, generate new filename
fname = generate_fname() + fext
filename = 'uploads/' + fname
res = conn.get(settings.BUCKET_NAME, filename)
content_type = mimetypes.guess_type(filename)[0]
if not content_type:
content_type = 'text/plain'
res = conn.put(settings.BUCKET_NAME,
filename,
S3.S3Object(struct['bits'].__str__()),
{'x-amz-acl': 'public-read',
'Content-Type': content_type}
)
if res.http_response.status == 200:
ret['url'] = '%s/%s/%s' % (settings.AWS_S3_URL,
settings.BUCKET_NAME,
filename)
except:
pass
return ret
I should mention that the method generate_fname(), which is used above, is just a function to generate a MD5 hash which will be used as a file name of the new file being added. It is not required, but you may want to use something similar. A quick run down of what this code does:
1 - Generates a file name to use.
2 - Creates an S3 instance.
3 - Gets a list of all your S3 buckets.
4 - Checks to see that the bucket you want to use exists. If not, it creates it.
5 - Checks to see if the file already exists. If so, it generates a new file name.
6 - Guesses the file type.
7 - Uploads the file to S3.
8 - Returns the file URL to your blogging client.
That's it! There are a few other articles written about this. Check them out as well!
Technorati Tags: amazon s3, blog, development, django, geek, python
500 Internal Server Errors
Saturday, June 2, 2007 - 7:09 PMWoooooops =) In my haste last night, I accidently added a change that wasn't completed yet, and it effected individual post views. The result was an Internal Server Error, it was related to the comment form. Sorry about that, and thanks for the emails letting me know there was an issue.
Just need to remember to test as much as possible before taking newer code live. I mean it really isn't that big of a deal as this is just a personal site, but still the habit should be in place.
Technorati Tags: blog, development, geek, oops
