Showing entries 311 to 320 of 378
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: Python (reset)
The Difference Between Multithreaded and Multicore Programming

It is no joke that computer hardware has advanced by leaps and bounds over the past decade. 10 years ago, multicore systems were expensive and high-end; today, your grandmother may have one and probably have no clue what she has!

Alas, application software has not kept pace. The Linux OS has done a fair job at being able to leverage some of the power multicore systems offer us, but applications running on them have not. The same can be said more or less for Windows, but it’s been a long while since I did anything systems-level with Windows. But the same issues do apply, however.

We are today with the multicore situation where we were in the 80′s and the 90′s with the multithreaded issues. Back then, CPUs grew support for multithreaded programming, but software — including some OSes — were slow to adopt. The Macintosh, when it was first released in 1984, would only support “cooperative” multitasking when the underlying …

[Read more]
Tech Messages | 2009-06-25

A special extended edition of Tech Messages for 2009-06-16 through 2009-06-25:

[Read more]
OSDC 2009 – call for papers reminder

The call for papers for OSDC 2009 is open until 30 June 2009; yes that’s only a few more days. Submit your abstract and do a talk at this fab conference!

This is a grassroots style conference designed by developers for developers.  It covers Perl, Python, Ruby/Rails, PHP, Java/Grails and Open Source operating systems as well as some business aspects.  If you’d like to cover something else as well that is Open Source themed, please feel free.

The Call for Papers can be found at: http://2009.osdc.com.au/call-for-papers
The important dates are:

  • Call for Papers Closes      30 June, 2009
  • Proposal acceptance         20 July, 2009
  • Accepted paper submissions  14 September, 2009
  • OSDC 2009 Main …
[Read more]
Hidden Features Of Perl, PHP, Javascript, C, C++, C#, Java, Ruby, Python, And Others [Collection Of Incredibly Useful Lists]

Introduction

StackOverflow is an amazing site for coding questions. It was created by Joel Spolsky of joelonsoftware.com, Jeff Atwood of codinghorror.com, and some other incredibly smart guys who truly care about user experience. I have been a total fan of SO since it went mainstream and it's now a borderline addiction (you can see my StackOverflow badge on the right sidebar).

The Story

Update 6/21/09: This server is currently under very heavy load (10-200), even with caching plugins enabled. Please bear with me as I try to resolve the situation.

Feel free to …

[Read more]
MySQL-python-1.2.3 beta 2 released

I released the second beta of MySQLdb-1.2.3 over the weekend. So far I've gotten a fair number of downloads but not a lot of feedback. I did find out though what small tweaking is required to build on Windows. It's also in the Python Package Index, so if you can also install using easy_install MySQL-python. Once I make the final release of 1.2.3, I'll put up more eggs for fringe operating systems (Mac OS X, Windows).

Of Character Sets, MySQL, and localization woes…

Let’s say you need to do a website that must support multiple languages for cultures as diverse as Japan, France, Russia, Saudi Arabia, and Brazil, as well as the US. This can be quite a daunting task, with all kinds of unexpected gotchas.

The ideal character set of choice is, of course, UTF8. Alas, you will note that most of the systems you’ll need to use defaults to LATIN1, including MySQL. If your site is written in PHP, that also by default is set to LATIN1.

I find it quite puzzling that in this day and age of globalization that many of the tools don’t default to UTF8. And there are major issues with this, because everything in the chain of delivery must either be set to UTF8 or can handle UTF8 or you’ll see bizarreness when you attempt to display the characters of some languages. You will probably see a series of question marks (“??? ??? ?????”) instead of the actual words. Sometimes you may see a series of squares. …

[Read more]
PHP, Python Consistent Hashing

I found out the hashing algorithm used in PHP-Memcache is different from that of Python-Memcache. The keys went to different servers as the hash created by python and php were different.

I posted a question on the memcache groups and was lucky to find this wonderful reply.

import memcache
import binascii
m = memcache.Client(['192.168.28.7:11211', '192.168.28.8:11211
', '192.168.28.9:11211'])

def php_hash(key):
    return (binascii.crc32(key) >> 16) & 0x7fff

for i in range(30):
       key = 'key' + str(i)
       a = m.get((php_hash(key), key))
       print i, a

This is the only thing that has to be done on Python's end, change the way the hash is calculated. The coding on PHP end remains same. All you guys using PHP for web based front-end with MySQL and Python for back-end scripts shall find this helpful.

Thanks Brian Rue.

Reference: …

[Read more]
Teaching a Course on Profiling and Debugging in Linux

Dear Lazyweb,

So, I’ve been in Chicago for a week teaching a beginner and an intermediate course on using and administering Linux machines. This week, I’ll teach an intermediate and an advanced course on Linux, and the advanced course will cover profiling and debugging. The main tools I’m covering will be valgrind and oprofile, though I’ll be going over lots of other stuff, like iostat, vmstat, strace, what’s under /proc, and some more basic stuff like sending signals and the like.

So what makes me a bit nervous is, being that the advanced students are mostly CS-degree-holding system developers, they’ll probably be expecting me to know very low-level details of how things are implemented at  the system/kernel level. I’d love to know more about that myself, and actively try to increase my knowledge in that area! Alas, most of my experience with low-level …

[Read more]
2009: Waiting to Exhale

Lots of blogs list a bunch of stuff that happened in the year just past, and I have done a year-in-review post before, but in looking back at posts on this blog and elsewhere, what strikes me most is not the big achievements that took place in technology in 2008, but rather the questions that remain unanswered. So much got started in 2008 — I’m really excited to see what happens with it all in 2009!

Cloud Computing

Technically, the various utility or ‘cloud’ computing initiatives started prior to 2008, but in my observation, they gained more traction in 2008 than at any other time. At the beginning of 2008, I was using Amazon’s S3, and testing to expand into more wide use of EC2 during my time as Technology Director for AddThis.com (pre-buyout). I was also investigating tons of other technologies that take different approaches to the higher-level problem these things all try to solve: owning, and housing (and …

[Read more]
Freiwild almost ready for Django 1.0.2

I've been working on our Freiwild Shop website today making it compatible with Django 1.0.2 (final(ly)!). Basically, what I've done is try to run it and fix where it errors following the direction documented in the manual. I think that the next days I'll see how I can optimize the MySQL usage a bit.

The shop I've build has little models and doesn't use to much fancy tricks. Among the changes:

  • Templates: extends should be on the first line
  • Models: should not contain anything Admin-related. This is actually very nice, seperating models.py and admin.py.
  • Model Fields: maxlength changed to max_length, oldforms/newforms options disappeared, small stuff like this.
[Read more]
Showing entries 311 to 320 of 378
« 10 Newer Entries | 10 Older Entries »