|
I learned from that but I'm told emphatically that there are much better choices out there and it's way out of date.
|
# ? Dec 10, 2012 01:24 |
|
|
# ? Jun 11, 2024 04:26 |
|
Caddrel posted:I'm not very proficient with python yet, but of the the free books out there Dive Into Python is helping me get up to speed quickly. I think it's best when you are already familiar with similar data structures and OO in other languages, and just need to know how python does it. It's an okay thing to teach you the absolute basics, but make sure to read lots of Python code actually written in the past several years if you're going to take it seriously.
|
# ? Dec 10, 2012 01:25 |
|
I highly recommend against Dive into Python. It's outdated, has terrible examples, and the author has been against making any effort towards keeping it up to date. The Python 3 version, while newer, makes a lot of mistakes and has bad code examples that would trip up a new user to Python.
|
# ? Dec 10, 2012 01:27 |
|
Yikes, well I'm glad I found that out.
|
# ? Dec 10, 2012 01:38 |
|
Suspicious Dish posted:Most of your programming days are going to be reading API documentation and figuring out how to glue pieces together, and building that broad understanding and terminology yourself, but maybe diving right in without a lot more hand holding the first time is too sudden. Yeah, hand holding is the term really. I feel like it's difficult to retain what I'm learning because I end up googling so many questions, that I end up forgetting why I started googling in the first place. I have to say, though, even getting a really simple terminal program running is such a satisfying feeling.
|
# ? Dec 10, 2012 03:22 |
|
Delicate Stranger posted:I have to say, though, even getting a really simple terminal program running is such a satisfying feeling. I don't know what its like when you're an old and jaded programmer, but speaking as someone who has been programming for just a few years...I get that feeling every time I grasp a new technique/API/theory.
|
# ? Dec 10, 2012 03:26 |
|
It's still extremely rare to write something and have it compile and work first-time that I often find myself cursing ccache or similar because I couldn't believe it just worked.
|
# ? Dec 10, 2012 03:35 |
|
Thermopyle posted:I don't know what its like when you're an old and jaded programmer, but speaking as someone who has been programming for just a few years...I get that feeling every time I grasp a new technique/API/theory. I agree with this, I hope this feeling never stops!
|
# ? Dec 10, 2012 03:36 |
|
The best way to experience this as an old and jaded programmer, I think, is to learn some language unlike anything you've learned. Learning Haskell for me was sort of like learning to program all over again.
Opinion Haver fucked around with this message at 03:45 on Dec 10, 2012 |
# ? Dec 10, 2012 03:38 |
|
Thermopyle posted:I don't know what its like when you're an old and jaded programmer, but speaking as someone who has been programming for just a few years...I get that feeling every time I grasp a new technique/API/theory. Outside of work I just have an amazing case of writers block so I spend a lot of time reading about languages and design look for anything that is going to take some actual, solid research that isn't just referring to an API or picking up a new language without making something from it. 90% of the time I just want to sit down and code something but don't have the faintest idea of where to start. Currently that journey has taken me into the depths of 3D graphics/game engines, and I can't see myself coming out of this as a whiz-kid any time soon.
|
# ? Dec 10, 2012 03:43 |
|
Thermopyle posted:Googlin' leads me to believe theres some plugins (or whatever you call them) for Flask to automate creating admin pages...are any of those any good? It's not flask based, but Kotti is a nice, thin CMS built on top of pyramid. It might hit your "does stuff for you, but not a nightmare to subvert" sweet-spot.
|
# ? Dec 10, 2012 04:19 |
|
e: discussed earlier.
|
# ? Dec 10, 2012 07:47 |
|
The Gripper posted:For me as an old (young, but old at heart) and jaded programmer the only thing that keeps me interested is finding a new idea to work on. Most of my day-to-day work is maintenance, retrofitting, and tool design which isn't all that interesting or compelling any more. Have you tried project euler? Lately I've been toying with a scrabble/words with friends solver. I find implementing algorithms, even already solved ones, more interesting than hooking together a bunch of different APIs in order to do something like display output on a web page.
|
# ? Dec 10, 2012 18:49 |
|
Project Euler is cool but my only complaint about it is that a lot of the problems are pretty hard until you figure out the mathematical trick to them which reduces computation time. Some can be bruteforced but the harder ones are pretty impossible in the lifespan of the universe unless you know exactly what they are getting at. So its more of a math game than anything.
|
# ? Dec 10, 2012 19:01 |
|
Sylink posted:Project Euler is cool but my only complaint about it is that a lot of the problems are pretty hard until you figure out the mathematical trick to them which reduces computation time. Yeah that's my main gripe with it. But I guess most code sites like that are math based. Or riddle based. Or stuff like "figure out how text is crypotgraphically hidden in this image" vv
|
# ? Dec 10, 2012 19:08 |
|
Reddit has /r/dailyprogrammer, which sometimes has interesting problems, not all of which are heavily "mathsy", and often come in multiple difficulties.
|
# ? Dec 10, 2012 19:35 |
|
I help out on #python and we have a "NO PROJECT EULER" rule. We're all bored of solving the same problems, and yeah, most of them are math problems, not computation issues. They're fun math problems, but don't illusion yourself into thinking they'll make you a better day-to-day programmer.
|
# ? Dec 10, 2012 21:21 |
|
I kind of like project Euler when I'm learning the syntax of a new language. I know all the solutions to the first 10 problems or so, which is all I generally do. I do think it can be helpful to type them in anyway in a new language to get a feel for it.
|
# ? Dec 11, 2012 00:42 |
|
How the hell do I make a beta distribution Python code:
|
# ? Dec 11, 2012 00:46 |
|
GrumpyDoctor posted:How the hell do I make a beta distribution Take out the a= b= stuff. code:
|
# ? Dec 11, 2012 01:05 |
|
fritz posted:Take out the a= b= stuff. Okay, but what are those parameters? Are they alpha and beta but I'm not allowed to call them that? And where am I supposed to be looking this up?
|
# ? Dec 11, 2012 01:08 |
|
e: wrong thread
|
# ? Dec 11, 2012 01:15 |
|
MeramJert posted:I kind of like project Euler when I'm learning the syntax of a new language. I know all the solutions to the first 10 problems or so, which is all I generally do. I do think it can be helpful to type them in anyway in a new language to get a feel for it.
|
# ? Dec 11, 2012 01:18 |
|
GrumpyDoctor posted:Okay, but what are those parameters? Are they alpha and beta but I'm not allowed to call them that? And where am I supposed to be looking this up? First parameter is points to evaluate the pdf at, second are a&b. From beta? : pre:A beta continuous random variable. Continuous random variables are defined from a standard form and may require some shape parameters to complete its specification. Any optional keyword parameters can be passed to the methods of the RV object as given below: Methods ------- rvs(a, b, loc=0, scale=1, size=1) Random variates. pdf(x, a, b, loc=0, scale=1) Probability density function. logpdf(x, a, b, loc=0, scale=1) Log of the probability density function. cdf(x, a, b, loc=0, scale=1) Cumulative density function. logcdf(x, a, b, loc=0, scale=1) Log of the cumulative density function. ... ETA: and I don't know why a= b= don't work.
|
# ? Dec 11, 2012 01:30 |
|
fritz posted:First parameter is points to evaluate the pdf at, second are a&b. Where did you find that, though?
|
# ? Dec 11, 2012 01:33 |
|
GrumpyDoctor posted:Where did you find that, though? If you use ipython, just type beta? at the prompt, if you use the regular python interpreter, stop doing that and use ipython, but if you can't then do "print beta.__doc__"
|
# ? Dec 11, 2012 01:40 |
|
I wish IPython would stop being a dick and play nice with my virtualenvs.
|
# ? Dec 11, 2012 02:03 |
|
What about using bpython instead?
|
# ? Dec 11, 2012 02:17 |
|
Another question: does anyone know why shutil.rmtree might be failing to delete a directory that exists with "No such file or directory," even when I set ignore_errors=True? I assume it has something to do with it being used with multiprocessing because it's not consistent or anything. (I have a third-party library that insists on creating a directory in my current working directory as part of its operation and I want each worker process to clean up its mess when it's done.)
|
# ? Dec 11, 2012 02:20 |
|
The Rosalind project has some good problems to practice programming on. I have done a few of them and didn't need any biology background. I can't speak for the higher level stuff.
|
# ? Dec 11, 2012 03:22 |
|
GrumpyDoctor posted:Another question: does anyone know why shutil.rmtree might be failing to delete a directory that exists with "No such file or directory," even when I set ignore_errors=True? I assume it has something to do with it being used with multiprocessing because it's not consistent or anything. Are you sure you're passing it the right path? Are you giving it a relative path or an absolute path?
|
# ? Dec 11, 2012 05:12 |
|
Note, not loving up indenting here. An experiment;-code:
|
# ? Dec 11, 2012 11:25 |
|
I'm kind of in a tough spot right now I posted before I'm nearly done with LPTHW though the book dumped a bunch of stuff in the last 3-4 lessons of it I have a hard time comprehending so early, like setup scripts and unit testing. (It doesn't help that the book basically says "google everything" at this point.) So I figure I would learn a bit by making some really simple apps, the problem is whenever I try to do something interesting (like with an interface) I kind of only half-understand what I'm reading, just not enough to absorb it and recreate it by myself. It's like I'm stuck between knowing the really basic stuff by heart but not being comfortable doing anything else or being able to learn the next stuff. I'm really not sure what to do at this point.
|
# ? Dec 11, 2012 11:35 |
|
duck monster posted:Note, not loving up indenting here. An experiment;- Did someone say, weird obtuse code that tests the boundaries of python and still works? I made this a while ago to see something. Python code:
pre:I am saying words words words! This led to probably the absolute worst code I've ever made Python code:
pre:Coug is of class: Cougar Cougar Coords: 70 30 New Cougar Coords: 75 33
|
# ? Dec 11, 2012 12:13 |
|
Daynab posted:I'm kind of in a tough spot right now I posted before I'm nearly done with LPTHW though the book dumped a bunch of stuff in the last 3-4 lessons of it I have a hard time comprehending so early, like setup scripts and unit testing. (It doesn't help that the book basically says "google everything" at this point.) Think up some crazy apps and make them. Its the only way to learn. "Do or do not. There is no Try" - Kurt Kobain 1943-1993
|
# ? Dec 11, 2012 12:36 |
|
Yep, took me a year but I made a thing from zero programming understanding, because it was something I wanted to make and was willing to sacrifice nights to make it happen. Just grab frameworks and toolkits that will help you make the thing you WANT to make and you'll learn plenty.
|
# ? Dec 11, 2012 12:43 |
|
Daynab posted:I'm really not sure what to do at this point. Make a dumb utility that might help you solve a problem. If you have to do a tedious calculation, or some repetitive task, try writing a special-purpose program to help you out. I learned Python by writing programs that did my high school algebra homework for me.
|
# ? Dec 11, 2012 12:44 |
|
Man, why can't I monkey patch the base class code:
But it doesn't The fucken thing would probably work on ruby.
|
# ? Dec 11, 2012 13:51 |
|
https://gist.github.com/295200 you can use ctypes to monkeypatch cpython
|
# ? Dec 11, 2012 14:58 |
|
|
# ? Jun 11, 2024 04:26 |
|
duck monster posted:Note, not loving up indenting here. An experiment;- nb this works because you assign the function to the class, rather than an instance. quote:Why one would code like this, I dont know, but hey, it works. It's kinda useful. quote:>>> class Foo(object): Every so often you will encounter a class where you want to compose it from other bits, but without using inheritance.
|
# ? Dec 11, 2012 15:01 |