Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Why so many Python web frameworks?

When asked about the plethora of web frameworks for Python the answer is often that it is way too easy to put together one in Python. That certainly seems plausible since there are so many libraries that implement the components of a web framework and if it's easy to plug those pieces together then maybe that lowers the bar of entry for new frameworks. So let's give it a shot, we'll pick some components and spend a couple hours seeing how far we can get building a web framework, which we'll call Robaccia. Executive Summary: Robaccia was built in three hours and a total of 60 lines of Pytho...

2,627 0       WEB DESIGN PYTHON WEB FRAMEWORK DYNAMIC SCRIPTING LANGUAGE


  Python: calculate lighter/darker RGB colors

Many times color palettes have lighter and darker variations of the same color. This may be used to convey relative importance, or for something as simple as a gradient. Usually the designer will specify both colors. However, if you have a site that needs to allow user configurable styling, you may not want to ask the user for two variations of the same color.Here is some Python code to take a single color in RGB, and output an artitrarily lighter or darker variation of the same color. You could wrap this in a filter and use it right in your Django templates.view plainprint?def color_vari...

7,756 0       PYTHON RGC COLOR CALUCALTION LIGHTER/DARKER


  Why Python is important for you

I believe that Python is important for software development. Whilethere are more powerful languages (e.g. Lisp), faster languages(e.g. C), more used languages (e.g. Java), and weirder languages(e.g. Haskell), Python gets a lot of different things right, andright in a combination that no other language I know of has done sofar.It recognises that you’ll spend a lot more time reading code thanwriting it, and focuses on guiding developers to write readablecode. It’s possible to write obfuscated code in Python, but theeasiest way to write the code (assuming you know Python) is almosta...

5,383 0       PYTHON IMPORTANCE PARADIGM


  Create successful Python projects

The ecosystem for open source Python projects is both rich and diverse. This enables you to stand on the shoulders of giants in the production of your next open source project. In addition, it means that there's a set of community norms and best practices. By adhering to these conventions and applying the practices in your project, you may gain wider adoption for your software. This article covers practices that have worked well for building large and small projects that have gained wide user c...

1,903 0       PYTHON PROJECT OPEN SOURCE TEAM MANAGEMENT


  Before Python

This morning I had a chat with the students at Google's CAPE program. Since I wrote up what I wanted to say I figured I might as well blog it here. Warning: this is pretty unedited (or else it would never be published :-). I'm posting it in my "personal" blog instead of the "Python history" blog because it mostly touches on my career before Python. Here goes.Have you ever written a computer program? Using which language?HTMLJavascriptJavaPythonC++COther - which?[It turned out the students had used a mixture of Scratch, App Inventor, and Processing. A few students had also used Python or Java.]...

2,499 0       PROGRAMMING LANGUAGE PYTHON HISTORY B


   Python – parallelizing CPU-bound tasks with multiprocessing

In a previous post on Python threads, I briefly mentioned that threads are unsuitable for CPU-bound tasks, and multiprocessing should be used instead. Here I want to demonstrate this with benchmark numbers, also showing that creating multiple processes in Python is just as simple as creating multiple threads.First, let’s pick a simple computation to use for the benchmarking. I don’t want it to be completely artificial, so I’ll use a dumbed-down version of factorization – breaking a number to its prime factors. Here is a very naive and un-optimized function that take...

3,772 0       PYTHON MULTITASKING MULTIPROCESSING CPU BOUND


  Don't write on the whiteboard

I recently interviewed at a major technology company. I won't mention the name because, honestly, I can't remember whether I signed an NDA, much less how strong it was.I did well. Mostly because of luck. I normally step over myself when I interview. I guess I've improved over the years. Here are a few tips to ace your own interview.1. Don't write on the whiteboardWhen I interviewed at Palantir around 5 years ago, I had a lot of trouble with this. Yes, I knew next to nothing about computer science then, but I should have been able to answer many of those questions. For example, Palantir ask...

3,076 0       INTERVIEW PYTHON PREPARATION WHITEBOARD NOTE


  Standardizing Python WSGI deployment

Over the past year I have been testing all of the new python platform as a service companies that have popped up, and I have posted my notes on my blog so that everyone can learn from my experiences. ep.io, apphosted.com, gondor.io, dotcloud.com, DjangoZoom.com, Heroku, Django hosting roundup,All and all, the platforms were very similar, they allowed you to easily host your python/django project without having to worry about managing a server or other typical system administration duties. Some of the services were more advanced and had more features then others, but since it was s...

2,810 0       JAVA PYTHON STANDARD WAR