Be the first to know about special offers and new products for web developers and Internet business owners.
I will never share your email address with the bad boys. Period.
|
Be the first to know about special offers and new products for web developers and Internet business owners. I will never share your email address with the bad boys. Period.
The latest
|
Convert your mockups to XHTML and CSSWeb standards are important and any serious web developer should use them correctly. Now that most people are running web standards compliant browsers, even a blog at the Washington Post asked visitors to stop using Internet Explorer 6, you should make sure that all your web sites are correctly coded. And by that I mean web pages written with clean XHTML and CSS, code that is friendly to people as well as search engines, code that produces usable and accesible pages with well optimized images, code that is easier to maintain and modify by any web developer. This is what I've been doing for years (except for this site which still uses a Drupal 5 theme, the new custom theme is on its way). Even in cases when my clients had some old XHTML and CSS I preferred to write cleaner versions. Now I've decided to offer this as a service for my colleagues. Available for new projects on November 2008Submitted by alexis on Thu, 2008-11-06 18:25.I've recently finished working in a couple of small projects and I'm about to complete another bigger one so I expect to have some hours available for new projects quite soon. If you're interested in hiring me for your next project please take a look at the services I can offer you and contact me to discuss details. Django questions and answers with a Swedish guySubmitted by alexis on Wed, 2008-10-29 15:43.Manolo Guerrero, that funny talking Mexican dude who happens to be a jQuery god and excellent friend of mine, introduced me to Andreas Krohn, a great pal from Sweden, evil mind behind WebHostNinja, with whom I've developed a nice Google App Engine and Django based Facebook application that will go live soon and I'll discuss later. Andreas is a highly energetic online entrepreneur and developer who's considering Django for his next project and asked me a few questions about it. These were very good questions that many may have asked before and I thought my answers could help others getting used to the Django way of thinking. How to use a public IP address with Google App Engine development serverSubmitted by alexis on Fri, 2008-10-24 17:05.And just when I thought that setting up Apache, mod_python and Lighty with Django was cool, and I haven't even started playing with mod_wsgi or nginx (the powerful Russian HTTP server, pronounced engine X) came the requirement to move the Django application I'm developing for Facebook to Google App Engine, the latest, and it seems the coolest, player in the cloud computing arena. While my code was running on a pure Django environment I setup the callback url in Facebook's developer application to point to my local server, some simple port forwarding in my router did the trick. Now I wanted to do the same using Google App Engine's development server. Regular expressions, Friedl and KodosSubmitted by alexis on Mon, 2008-10-20 17:20.Understanding and using the power of regular expressions, or simply regex, is a must for every smart programmer. Django uses them quite often on its elegant URLConf system. I've been using regular expressions for a very long time and have read many books about them but if I have to recommend just one I'll go for the classic Mastering Regular Expressions by Jeffrey Friedl. And nothing better to test you're on the right track while writing your own regular expressions than Kodos, a simple but nice Python based tool, easy to install from any Debian based distro with a quick sudo apt-get install kodos. Use double quotes for {% url %} on DjangoSubmitted by alexis on Mon, 2008-10-20 15:34.I recently commented about using the right quotes with Python and simplejson and today I found a similar issue with Django. It happens when using the {% url %} tag on the template system in Django 1.0. {% url %} helps you to avoid hardcoding links and relies on naming your url patterns. Let's suppose we have a url like this in our URLConf:
Now you could insert {% url %} in your template to get the url for a link:
Notice I'm passing the string "abc" using double quotes as the chatroom_data parameter. And here's the important part, these two won't work:
which does not use quotes at all, or this one:
which uses single quotes. The errors may vary depending on how your code works but the fact is to remember that when passing string based parameters to {% url %} you need to always use double quotes. If you're using numbers you could use either no quotes or double quotes. Single quotes will never work. When did you learn to program and in which language?Submitted by alexis on Sat, 2008-10-18 17:38.It's Saturday morning and I started the day reading another chapter of Introduction to Algorithms And while I tested some Python code I tried to remember when I started to program and in which language. It was 24 years ago, in 1984, I was twelve and my first computer, a PC XT (Intel 8088, 4.77 MHz) had less than six months at home. The language was Basic, first as BASICA and later as GW-Basic running on DOS 3.2. And you? When did you learn to program and in which language? How to setup Apache, mod_python and a reverse proxy to Lighttpd for Django on UbuntuSubmitted by alexis on Fri, 2008-10-17 18:52.It's October 2008 and there's no doubt now that serious web development requires working with frameworks, software that allows us, lazy coders, to forget about repetitive tasks and focus on the specifics of each project, the stuff that makes them truly unique. It's pretty obvious too that Django, the Python based web framework, is attracting more developers and companies lately. Guido is a googler since 2005 and the recently launched Google App Engine uses Python and Django. Seriously, there's not a better time to jump into the Django train (no pun intended RoR guys). Experienced programmers can start writing Django applications quickly thanks to the excellent documentation and the free Django book. I've also read and can recommend Practical Django Projects, by James Bennett, part of the Django team, and Learning Website Development with Django, by Ayman Hourieh, a very smart and young Google engineer. Django is really a web framework for perfectionists with deadlines. I'm very near to one and have almost finished coding what will be my first Django based application for Facebook. Yes, I've got a few articles about that coming soon as well. So, everything looks great under the Sun on Djangoland? Well, there's something that bothered me since I started a few months ago: deployment on a production environment. The documentation and most books get us up and running quickly with the included development server and then just refer us to the recommended Apache and mod_python settings for more. Unfortunately, specially if you're used to the common Linux, Apache, MySQL and PHP setup, like I was, you may be need more detailed instructions and that's why I decided to write this tutorial on how to setup Apache, mod_python and a reverse proxy to Lighttpd for Django. Quotes causing problem with Python and simplejsonSubmitted by alexis on Fri, 2008-10-17 16:47.
My application will receive a string of JSON and transform it to a dictionary, pretty simple. Let's run a test first, starting with the Python shell, or better yet, iPython, and importing the module:
Now let's define a string using JSON notation and pass it to simplejson:
And we get a ValueError exception. Let's try using simple quotes for enclosing the whole string and double quotes for the JSON keys and values:
And there you go, no error now:
I find a little strange that this problem happens as I've been using either type of quotes for most of my Python coding. Had you noticed this problem? I've checked simplejson's documentation and could not find anything related to this. One last word, the new Python 2.6 includes a json module, which is a refactored simplejson. Neat. Flock 2 and your Internet connection lost in Ubuntu HardySubmitted by alexis on Wed, 2008-10-15 14:31.
But right after installing and browsing a bit, I'm on Ubuntu Hardy 64 bits, I noticed my Internet connection was gone. It wasn't really gone but Flock couldn't connect to any site external to my computer. I tried googling around and found the fix. The funny thing is that what my search returned was an article I had written with the solution some time ago. Here's the solution to the Internet connection lost in Flock in Spanish. And here's the English version. How to fix the connection lost problem with FlockOpen Flock and follow these steps:
|
Want to launch a online store, need a new look for your website, market your services on the Net or build a virtual community? Not a problem, let's talk about it. Where To Host Your Sites? |
Recent comments
4 weeks 4 days ago
4 weeks 4 days ago
4 weeks 6 days ago
4 weeks 6 days ago
4 weeks 6 days ago
4 weeks 6 days ago
4 weeks 6 days ago
5 weeks 2 days ago
5 weeks 3 days ago
5 weeks 3 days ago