TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How do I teach intermediate Python engineering skills?

29 pointsby _9iucalmost 5 years ago
I have several reports with backgrounds in science or ops who can write python to accomplish tasks, but are bad at engineering (i.e. the type of code you would write for a large project).<p>I feel that much of my own engineering skills were acquired through a time consuming combination of reading lots of well crafted code and getting feedback pointing out my mistakes from more experienced engineers. Are there resources that would be more time efficient to fill some of the gap for these folks?<p>What do folks on HN suggest?

10 comments

hackermailmanalmost 5 years ago
Volume 2 here teaches Python optimization <a href="https:&#x2F;&#x2F;foundations-of-applied-mathematics.github.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;foundations-of-applied-mathematics.github.io&#x2F;</a> or you could go through a copy of the Pragmatic Programmer with them <a href="https:&#x2F;&#x2F;www.cs.cornell.edu&#x2F;courses&#x2F;cs3110&#x2F;2020sp&#x2F;reflections.html" rel="nofollow">https:&#x2F;&#x2F;www.cs.cornell.edu&#x2F;courses&#x2F;cs3110&#x2F;2020sp&#x2F;reflections...</a><p>All the &quot;engineer&quot;-ry things like constructing testing oracles or understanding code complexity this can all be found in <i>Programming and Programming Languages</i> <a href="https:&#x2F;&#x2F;papl.cs.brown.edu&#x2F;2020&#x2F;" rel="nofollow">https:&#x2F;&#x2F;papl.cs.brown.edu&#x2F;2020&#x2F;</a> that uses Pyret which has similar enough syntax to Python none of your bad engineers will be lost. There are lectures for it too: <a href="https:&#x2F;&#x2F;learnaifromscratch.github.io&#x2F;software.html#org4eef4d9" rel="nofollow">https:&#x2F;&#x2F;learnaifromscratch.github.io&#x2F;software.html#org4eef4d...</a> you could teach this class to them the lectures really teach you concepts like trees and graphs and how to reason about them.
评论 #23870861 未加载
rahimnathwanialmost 5 years ago
Maybe these:<p>Practical Object Oriented Design (Metz)<p>Refactoring (Feathers)<p>Test driven development with Python (Percival)<p>Missing Semester: <a href="https:&#x2F;&#x2F;missing.csail.mit.edu&#x2F;" rel="nofollow">https:&#x2F;&#x2F;missing.csail.mit.edu&#x2F;</a>
semicolonandsonalmost 5 years ago
If you&#x27;re comfortable broadening the scope to _non-language-specific_ engineering skills, check out my Semicolon&amp;Sons screencasts.<p>The drive behind this project is to demonstrate non-beginner issues facing professional developers. Instead of ephemeral syntax tricks or &quot;how to use library x v5.3&quot;, the focus is on skills affecting codebases over decade-long timelines, such as:<p>- gaining confidence in code with (non-brittle) integration tests<p>- deep understanding of what the OS offers (and fluency in the command line)<p>- building excellent monitoring and instrumentation for rapidly diagnosing production issues<p>- vetting dependencies so they don&#x27;t bite you in the ass<p>- architecting code for re-use and intuitive navigation for freshly onboarded team members<p>- the paramount importance of data integrity (and how to enforce it at the DB level)<p>etc.<p><a href="https:&#x2F;&#x2F;www.semicolonandsons.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.semicolonandsons.com&#x2F;</a>
probinsoalmost 5 years ago
Introduce them to Rich IDEs and help them set it up with a consistent configuration so they can help each other. Put git hooks in to control for silly errors. Create a style guide that scales with the importance of the project. for understanding the language more deeply, &quot;python cookbook&quot; by David Beasley. ask them to make everything pip installable. introduce code walk throughs to your workflow, with the intention of group peer-review.<p>When you see an interesting block of code that you see could be refracted, hold a session showing your refactoring of that code. You&#x27;ll have to do it twice, once to figure it out, second to present. It&#x27;s very time-consuming but it&#x27;s the best way for people to learn
verdvermalmost 5 years ago
Hire a Python dev &#x2F; eng to work with them. Pairing eng with domain is always a good choice
评论 #23849564 未加载
njsubedialmost 5 years ago
I&#x27;d suggest letting them dive into your code, and make minor changes. That will increase the chances of them structuring their software the way you do, which makes teaching easier. If they get stuck somewhere, getting help is much easier for them.
op03almost 5 years ago
Just hire better programmers and keep the scientists focused on science. It&#x27;s just much more efficient. Its like wasting time getting your pitcher to improve his batting skills. Don&#x27;t mix roles up.
afarrellalmost 5 years ago
The Wikipedia article on Working Memory followed by at least the first four chapters of A Philosophy of Software Design. This is really good for providing an underlying “why” for any other technique.
kazinatoralmost 5 years ago
I would start with these:<p>1. Commit hooks that lint code (pylint3, flake8, ...). Code must be clean before it is merged.<p>2. Introduce testing: code must be covered by tests.<p>3. Require documentation: there must exist an independent specification of what the code does, at least from an external point of view: what are the interface contracts.<p>Once you have code that is specified and covered by tests, only then do you have a proper environment for transforming badly structured code that works into better structured code that <i>still</i> works.<p>Other than that, organization of programs is a big topic that requires study of theory. For instance, you could probably rediscover the idea that code should be organized into modules such that the content in a module belongs together, and isn&#x27;t tightly bound to content in another module. You might not have a name for this but an intuitive feeling for it, which is very good. But if you study software engineering, you will learn about cohesion and coupling directly, so you don&#x27;t have to reinvent or rediscover the wheel. The cumulative effects of learning material directly add up; you can shave years and years from the time it takes to become competent.<p>I think that the decline in the &quot;Wirthian&quot; languages like Modula 2 has been detrimental. The biggest initial boost that I got in the understanding of structured, modular programming was from programming in Turbo Pascal and Modula 2 in the late 1980&#x27;s.<p>In Modula 2, you structure the program in modules which have a clear interface and implementation, declared in separate files. Modules declare their dependencies on other modules. From this, the compiler knows all the dependencies. There is no need for any Makefile or dependency generation; you tell the compiler to build the program, pointing it at the main module and that&#x27;s it.<p>Each module has a block of global initialization statements. The compiler&#x2F;linker, knowing the dependency among the modules, ensure that these statements are executed in module dependency order: if A depends on B, B&#x27;s global initialization runs first, then A.<p>When I started coding in C, I realized immediately that this is missing: there is just a <i>main</i> function and after that you&#x27;re on your own. Moreover, unless you declare your dependencies to the Makefile or IDE system or whatever you&#x27;re using, or get it to figure them out externally, you will not get correct incremental builds.<p>So I simulated modules by carefully structuring header files, and giving each module a global initialization function, and then call these in some disciplined way, like from one big init function.<p>I later saw (thanks in a large part to open source) that other people&#x27;s big C programs did things like this. I felt that programmers who had exposure to a language supporting modularity had an edge in understanding the issues and motivation for good organization patterns in C programs compared to those who were just getting randomly burned and improving their approach by trial and error.
DrNukealmost 5 years ago
Case studies from interesting and &#x2F; or hyped domains maybe?