5 ms·
Pytudes
- Eddygandr 3y agoEtudes for Programmers is really hard to find to purchase - looks like it is around 450 USD on my local Amazon store and none in local libraries. Does anyone have a link to a PDF of it instead?
- freilanzer 3y agoYou could look on libgen.
- Pannoniae 3y agohttps://ufile.io/5y73koee https://ufile.io/5y73koee
- Eddygandr 3y agoThank you!
- nilsherzig 3y agoCheck out Anna's Archiv, they mirror every big book page and have a very nice search engine and multiple redundant download backends
- shrubble 3y agoThis is a reference to the older book, Etudes For Programmers by Charles Wetherell which Norvig is no doubt appreciative of.
- canvascritic 3y agoStumbled upon norvig's pytudes years ago during a leetcode grind. His elegant approach to problems always had this touch of clarity that only few possess. Python, with its expressive syntax, combined with norvig's penchant for crafting illuminating examples, has definitely provided me with numerous 'aha' moments. I recall, early in my career when learning about bayesian probabilities, that it was peter's "how to write a spell checker" that made the abstract concrete for me. it's really heartening to see such a legend continuously contributing to and enriching the programming community.
- fsociety 3y agoDitto. His Udacity course opened me up to how expressive, yet understandable, code can be with some careful thought. Lots of wow moments comparing my solutions to his.
- ChrisArchitect 3y agoAnything new on these?
- benjaminl 3y agoKinda hard to answer as that depends on your definition of new. But most likely yes, https://github.com/norvig/pytudes/commits/main https://github.com/norvig/pytudes/commits/main
- thrdbndndn 3y agoCould someone provide some context? I can understand the py scripts, but is confused by these very long Jupyter notebooks.
- eternityforest 3y agoMy takeaway from the whole thing was "Maybe ipy notebooks ARE the tech I should be learning next!" Never really had a reason to use one, but it seems like people are big fans.
- deleted 3y ago[deleted]
- baq 3y agothey're executable blog posts. kinda.
- Yajirobe 3y agoSo it’s supposed to be ‘exemplary’ and ‘beautiful’ but literally the first script I opened had global variables used. That’s not my idea of elegant Python.
- quietbritishjim 3y agoElegant means written in the simplest, clearest way possible. Agreed, a complex application riddled with global variables is not elegant. In a fifty line self-contained script, global variables are often the simplest way to go. Turning the code into a reusable class with member variables, which will never be reused, is not simpler. YAGNI.
- Etherlord87 3y agoIn Python every module is an object. It therefore makes less sense (in less situations it makes sense) to use classes, and a 'global' is a variable global to the module. It's like having a class, and calling attributes of the class 'globals', because they can be accessed by all methods of the class. This and the fact Python is often used in the context of writing simple utilities, where globals (even without the defense above) are perfectly fine (because it's not a huge codebase with namespace collisions etc.). Using absolute axioms like "globals are always bad" and religiously applying them is a toxic attitude in my opinion.
- cjalmeida 3y agoExactly. Only "builtins" in Python polute the global scope. Module globals are closer to singleton instance variables.
- wheelerof4te 3y agoLast time I've read this, it had too much code golf with FP Python. No one is using Python like that in the professional world. The most complex you'll see are simple comprehensions. Python is supposed to be a readable language for newbies, like Golang.
- globular-toast 3y agoPython is supposed to be whatever you want it to be. It's free software. Who cares what people do in the "professional world"? This is Pytudes and it's quite fun. Learning to program in different paradigms helps your mind to grow, even if you won't use them yourself. I see quite a lot of higher-order functions in "real" Python anyway. I'm not sure what other FP concepts there are in Pytudes.
- freilanzer 3y ago> No one is using Python like that in the professional world. The most complex you'll see are simple comprehensions. That's part of why much of the software industry is incredibly boring work. And also this isn't work, it's supposed to be fun, do whatever you want.
- evgen 3y ago> No one is using Python like that in the professional world. The most complex you'll see are simple comprehensions. It is possible that blub-Python and "let's code it in Java-flavoured Python" rules your particular slice of the profession, but in my world of getting shit done I see more FP and using simple built-in data structures in a >1 KLoc line script/module than I do of traditional OO and GoF styles. Most objects I deal with in Python are from libraries I call and not from our own code. Different strokes I guess, but I think you underestimate the breadth of Python usage and how much of it is semi-complicated scripting that picks from FP-style and OO-style depending on what is easiest to accomplish the task.
- hk__2 3y agoI think OP refers more to the "code-golf" part than FP: the repo contains code that uses OO when necessary and FP (although in a very light way) when it can. The biggest issue is that it tries to be as short as possible, which makes it hard to understand. Code should be simple, not short. Instead of looking at Loc, we should look at "how much time does someone need to understand this part of the code".
- gorenb 3y agoThere should be more of these: ctudes, jstudes, etc.
- naillo 3y agoIt's inspirational to me that norvig still does these things. That he gets joy out of it so late in life, that he's still more than mentally adept at it, etc. Makes me feel like pursuing programming as a craft for life is a worthwhile option.
- Version467 3y agoYou make it sound like he's at deaths door. Peter Norvig is 66. I know ageism is big in the tech industry, but this seems a little excessive.
- naillo 3y agoLots of people get tired of their career as decades past. Just expressing positive sentiment that he's at it still.
- dagurp 3y agoI love the pickleball tournament example. I tried to implement this for badminton several years ago but I could never figure it out.
- pantsforbirds 3y agoNorvig has always been a huge inspiration for me. I read his sudoku solving blog (https://norvig.com/sudoku.html https://norvig.com/sudoku.html) when I was first teaching myself to code and it really helped me nurture a love for solving fun problems.
- selff 3y agoDoes anyone know similar etudes for system programming?