Re: Announcing a new podcast: Radio Free Python

2011-08-24 Thread Michael Hunter
On Wed, Aug 24, 2011 at 2:50 PM, Terry Reedy  wrote:
[...]
>> You can find it at http://www.radiofreepython.com/ as of this very minute.
>
> What a treat. Thank you. Please announce the next one too.

No, please don't announce the next one.  There should be a RSS feed.
But please do announce the feed at regular intervals.

   Michael

>
> --
> Terry Jan Reedy
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Announcing a new podcast: Radio Free Python

2011-08-24 Thread Michael Hunter
On Wed, Aug 24, 2011 at 3:41 PM, Ethan Furman  wrote:
[...]
>> No, please don't announce the next one.  There should be a RSS feed.
>> But please do announce the feed at regular intervals.

Note, I didn't say announce the feed each release.  In fact, I didn't
even say announce the feed in this channel.

>
> You're kidding, right?  Instead of an alert for each podcast release which
> says, "Hey, there's something there right now!" you would rather have an
> alert that says, "Hey, check out this RSS feed, which may have nothing on it
> for another three weeks until the next podcast is ready!" ??

No, you use the RSS feed to notify interested parties that a new
podcast is available.  You advertise the feed in a general way to get
new users.  Those are different things.

>
> I vote with Terry.

Not sure how either of you was thinking but I do think the podcast
author should use RSS.

Michael

>
> ~Ethan~
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Learning python reading software source code

2011-08-25 Thread Michael Hunter
On Thu, Aug 25, 2011 at 8:31 PM, Chetan Harjani
 wrote:
[read book, picked miro to read through]
> So I am looking for suggestions on how one can understand the code better.
> Any specific references I should look in as I stumble upon libraries n
> functions while reading or just the python official docs would be enough?

Mess the code up.  Make changes to it.  Alternate between writing
code, often reading code, and occasionally reading books.  The act of
having to mod the code and debug those modifications will lead you
through many documents.  But the documents on their own shouldn't usu.
be your guide.

A note on reading books.  A book or two can be useful for learning a
language.  But beyond that books about specific language have quickly
diminishing returns.  Instead read books about high order concepts
(e.g. software engineering, algorithms, problem domain specifics).

   Michael
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Embedding Python: estimate size of dict/list

2011-03-28 Thread Michael Hunter
On Mon, Mar 28, 2011 at 4:18 PM, Chris Angelico  wrote:
[...]
> Obviously I could use PyObject_Str() and PyString_Size() to get a
> decent figure, but that seems like overkill.
>
> What I'm hoping for is some simple function that zips through a
> complex object and sums its approximate memory usage. Is there one?
[...]

Check out David Malcom's video on memory usage from PyCon 2011 at
http://blip.tv/file/4878749

There isn't a direct answer to your question but you might check out
the tools he has built as a step in that direction.

 Michael
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Multiple threads

2011-11-16 Thread Michael Hunter
On Wed, Nov 16, 2011 at 9:27 AM, Dave Angel  wrote:
> On 11/16/2011 12:00 PM, Jack Keegan wrote:
>[...] Processes [...] and the OS is generally better at scheduling them than 
>it is at
> scheduling threads within a single process.  If you have multiple cores, the
> processes can really run simultaneously, frequently with very small
> overhead.  [...]

Maybe you are trying to simplify things but in a lot of cases this is
just false.  In at least some operating systems these days a thread is
the basic unit that is scheduled.  Processes are thread containers
that provide other things (fds, separate address space, etc.).  The
comment about multiple cores can be extended to multiple threads on a
core (CMT) but applies to threads as well as processes.  Switching
between processes tends to be heavier weight then switching between
threads in a process because of the needs to change the address space.

Just because Python sucks at threads doesn't make them heavier for the OS.

That doesn't mean you shouldn't use multiprocessing.  The problem
asked about seems a good fit to me to a single python process starting
and managing a set of external converter processes.

  Michael
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Developing a program to make a family tree.

2011-01-15 Thread Michael Hunter
On Fri, Jan 14, 2011 at 11:39 AM, Ata Jafari  wrote:
> Hi there.
> I'm trying to develop a program like family tree maker. I have all
> information, so there is no need to search on the net. This must be
> something like trees. Can someone help me? I'm at the beginning.
> Thanks.

I think you are probably coming at this from the wrong direction.
Either you want to solve your family tree problem in the easiest way
possible in which case there are already packages available or you
want to develop this because you want to do the project to learn
(more) python, etc.  Assuming the later the fact you have to ask the
question in the way you did means you are short on software design
experience and don't know much about the problem domain (genealogy).
Additionally you probably havn't written much code although you came
here so you probably have a little experience.  That is triple death.
You need to hold a couple of those variables stable.  I'd suggest
finding a existing open source genealogy program and use bug fixing as
a way to learn basics about the package and then try to add a feature
as a way of learning something about software design.

   Michael
-- 
http://mail.python.org/mailman/listinfo/python-list