@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14



Comments:

<0> sivang: you send in a function
<1> stain: I think I did, a method from a cl*** I created. is that wrong?
<2> Do you mean making things easy to understand is something no-one knows well?
<3> Cheery: "How to make things easy to understand?" first start with socrates, aristotle, hume and kant and then existentialism.
<1> I have a DirInfo cl***, in which a .calculate() mthod is defined
<1> I did something like:
<0> wchun: muahaha
<4> Cheery, don't be cheeky. Be specific. Do you want a complete explantion on good programming practice here in IRC?
<0> "How to do things right"
<1> a = DirInfo("/home/sivan")
<1> then,
<0> "How do I make a program for solving my problems?"
<1> thread.thread_start_new(a.calculate(),())
<1> stain: is it wrong to use an object's method for that?
<2> mischko, making things easy to understand is hard?
<5> That's okay, I don't understand your question.



<0> sivang: no, that should be fine
<0> sivang: but don't call the method
<0> just say a.calculate
<2> I just want to know how anything could be done simple, easy to understand, nice.
<4> Cheery, for some it is. But that's a very big topic and can't be explained in a few lines in IRC. I could answer "Write good code", but that wouldn't be helpful.
<0> without the () - which would give the result of calculate() as the argument
<4> Cheery, it's too broad of a question is what people here are trying to point out to you.
<0> Cheery: number = 2 is quite simple and understandable.
<0> not_five = 5 is of course a bit weirder
<4> Cherry, We can give you broad answers to broad questions but you probably want something more specific so you need to ask specific questions.
<2> sorry.
<4> Using Python is a good start to making things easy to understand. It's a nice language.
<1> stain: ah okay, I'll try that now.
<2> heh. I use python already. :) Found great enlightement from it.
<2> I just want to make better, asking questions. Finding something new.
<2> Maybe this question is something I need to go through myself.
<4> Cheery, it takes a lot of experience to make complex things simple and understandable, and lots of study to find what your options are.
<2> I we would know how to make anything simple to understand, we would use binary to write programs.
<0> sivang: it's one of the cool things about Python, everything is object, even functions and cl***es
<2> we would even use it for using computer anyways.
<4> Cheery, binary would be the least undestandable way to do it, for humans to understand it.
<0> so you could even do my_method = a.calculate and have fun with my_method(something) - and it would still be bound to and modify the a-object
<2> mischko, this is just mind bending. Of course it would be.
<0> how do you use "binary" to write programs?
<0> you mean like using the binary /usr/bin/vim ? =)
<4> Cheery, what kind of program are you wanting to write? A web application or what?
<2> mischko, user interface for my editor.
<4> You wrote your own editor? GUI or text based?
<0> you've made an editor, you just need to create the interface? :)
<0> I started making curses-based applications with a library called urwid.. it was really cool
<0> very much high-level
<6> anyone here codes with sqlobject?
<0> s0undt3ch: yes.. in TurboGears
<4> s0undt3ch, used to.
<0> (I've made my own variant)
<2> mischko, yes, it's job is to position tiles and objects into my game, so it's great exercise and target for my practise.
<4> Cheery, are you familiar with the Model View Controller design pattern? That would be a good place to start in making code easier to understand and maintain, in my experience.
<6> my prob is, I wan't to search for 'a b' in a string, but what's I'd really like is search in the resultset of 'a' for 'b'
<2> I don't understand, how model view controller pattern helps me in this case?
<6> don't now if I made my self clear
<4> Cheery, it helps you organize your code in a clean way.
<4> s0undt3ch, search for all strings with 'a' and then search those for 'b'?
<6> mischko: yeah, here's my search code -> http://python.pastebin.com/550194
<0> Cheery: if you want to make a user interface that is "easy to use" you need to look into user interface designs and usability and usability testing.. For instance you need to find out who are your users
<6> mischko: does it make any sence?
<4> no! :)
<4> s0undt3ch, I'm still figuring it out. I'm slow with other peoples code.
<0> for an editor there's quite a big difference from say a newbie editing his PHP-script and just wants tab-completion on function names to a crazy coder with beard who wants full control and full scripting, but don't really want any "magic"
<6> mischko: Imagine this "This is a name", I'm searching for "This Name", a normal query will return nothing, but a query for "This" will return a match, and on that result set I wan't to search for "Name"....
<6> mischko: specially my code ;)
<0> s0undt3ch: so you want kind of "and"-ing
<0> like in Google
<6> stain: well, yeah, but it's has to be a dynamic and-ing
<0> build a set of the results, and then for each term just intersect down
<0> but I don't see the match with your code.. what are these hashes?
<4> s0undt3ch, sql would be "select foo from bar where foo like '%This%' and foo like '%Name%' "
<4> ?
<6> now in translate it for sqlobject ;)
<6> mischko: well, I think so
<4> or do you want them in a specific order where 'This' must appear before 'Name'?



<6> mischko: that's preferable
<6> but not that really much important
<4> so "select foo from bar where foo like '%This%Name%'
<4> "
<7> you can't use '~' in file paths?!
<8> http://www.phpeasyproject.com/screenshots/ lo habeis probadoalguna vez?
<6> mamat: os.path.expanduser
<6> mamat: something like that
<6> mischko: and how do I do that with SQLObject?
<4> s0undt3ch, I'm not sure. It's been a long time since I've tinkered with it :(
<4> some others here may be more current on it. I went to straight SQL a long time back.
<6> mischko: well, there's where my prob resides, I really don't know much SQL ;)
<4> I'd say that learning SQL would be a prereq to using sqlobject. There are some very good books out there.
<8> huy mira.. http://www.phpeasycms.com/ http://www.phpeasyproject.com/ http://www.phpeasyshop.com/
<0> yeah, look into SQL, because sqlobject is just kind of a "python mapping" of SQL that's easier to code if you already know SQL
<0> so it would be a very hard way to actually learn SQL
<0> since the "real stuff" is hidden
<4> s0undt3ch, google for "sql tutorial"
<4> tons of results.
<6> yep, that's why I used sqlobject ;)
<7> i saw code doing "open(...).write(...)" but is the file getting closed?
<4> http://www.sql-tutorial.net/ looks like it might be a good place.
<6> mischko: I understand what you typed in plain SQL, my real prob is translating it into sqlobject ;) but i'll look at that url....
<6> thanks
<4> s0undt3ch, That would be like using a meta programming tool without understanding how computers work.
<9> mamat, yes it will.
<7> nice
<4> s0undt3ch, I think sqlobject has a good email list. Get on it and ask there also.
<9> however
<9> on exit only
<7> doh
<6> mischko: yep, guess I'll join one more mailing list
<9> and thats it
<9> you want to do ...
<10> hey does anyone know the best python tutorial for a newbie?
<9> fd = open(...)
<6> MaxDesign: the one python provides
<9> try:
<9> ...
<11> Do you guys know if LPhoto is being actively worked on?
<9> finally:
<4> MaxDesign, newbie to programming or newbie to Python?
<9> fd.close()
<6> MaxDesign: www.python.org/docs
<10> just a newbie
<6> MaxDesign: that's where I started, and do note that I have some huge Python Tutorials in PDF form, but what python.org makes available is excelent to start
<4> %google thinkcspy
<12> thinkcspy: http://www.ibiblio.org/obp/thinkCSpy/
<10> ok
<4> MaxDesign, follow that link a;lso.
<4> s/a;lso/also/
<7> kbrooks: i have a file which i open/read then i open/write it... should i close it inbetween?
<10> mischko: I've been reading tutor
<13> i began python with http://livewires.org.uk/python/index.html
<9> HazyNRG_, finally! thank for that livewires link
<4> MaxDesign, Python is a great first programming language.
<4> %google livewires
<12> livewires: http://www.livewires.org.uk/python/
<10> ok thanks guys i have more enough
<4> MaxDesign, OReilly has some good Python learning books also.
<10> *than*
<4> i.e. "Learning Python"
<6> mischko: those are the books I have in PDF ;)
<4> s0undt3ch, did you get one of OReilly's CD Rom's of books? I'd love to get one of those one of these days.
<6> mischko: the cd's that come with the books?
<4> s0undt3ch, they used to publish books on CD's. Lemme check.
<6> mischko: well, athough alot of ppl will throw things at me, I'll say it, I used my Mule to download them ;)
<6> I have ~70Megs of Python books
<11> torrent?
<6> sams, wiley, oreilly, apress...
<6> Martin_: is that for me?
<4> s0undt3ch, they have "CD Bookshelf" products but I don't see one for Python.
<7> kbrooks: i have a file which i open/read then i open/write it... should i close it inbetween?
<4> mamat, I'd just go ahead and close it.


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #python
or
Go to some related logs:

aticonfig viewsonic 1600x1200
#ldap
lesbo linux
#perl
x-window-system-dev ubunut
mknod hdk
debian VITESSE vsc8201RX
vanderpool tyco
kubuntu glxgears error BadAlloc
345M 6.06



Home  |  disclaimer  |  contact  |  submit quotes