Hacker News new | ask | show | jobs
by tmshu1 1225 days ago
Anyone have recommendations for how to get a code mentor? Aside from people at work. I work for myself, by myself now.

I want to write better quality code: less fragile, easier to change. Which is something I haven’t really done for one reason or another. Now, to level up my development skills, I just finished reading Philosophy of Software Design, Clean Architecture, and Design Patterns. I guess Stackoverflow is a good place for me to get most questions answered. But I like the idea of an “in-person” mentor who can help me discover things I don’t know I don’t know. Things about the general “art” of being a good developer that seems to encompass much more than just knowledge about what good code is like.

7 comments

The only way I know of to watch live programming streams from programmers your respect.

In my case, that would be Jonathan Blow and Casey Muratori.

You might already be aware, but I wanted to mention it for anyone else who might be interested in software performance - Casey has a new “performance-aware programming” course [0] where he goes through how to write performant software. It’s a work-in-progress where he’s putting out a video (or a few) each week. It’s pretty great so far. For anyone who’s done a CS degree it seems reminiscent of the architecture class where they taught about the CPU and assembly, except this is covering modern CPUs and SIMD and stuff, and focused on writing for maximum performance.

0: https://computerenhance.com

Agree with this. I learned a lot from https://www.youtube.com/@JonGjengset last year even though his video is so long.
One avenue that people tend to ignore is to look under the hood of code you already use. I've learned an immense amount from looking at the source code of open source packages I use, and seeing how the internal code is structured, what tradeoffs they make, etc.

It's not a mentor, but it can open up some options beyond books and stack overflow, especially if the projects you look at are full of comments.

here an idea. invent some low-UI personal project, e.g. with Command Line interface. Sorting mp3s, whatever. Think well what u might need as functionality, say 10-15 items, not more, put them as options of the CLI. Code it fast - don't overthink it. Leave it as such and use it for a while, like it's somebody else's closed-code. Everytime u find out some extra need or non-fatal-mistake, fight the urge to fix it, note these down. When collected enough of those (how much is enough? 10? 5? 2? maybe when it gets to your nerves), refactor it, with further/modified vision of what u need. (and now, how u need it coded).

Repeat few times. on 10th-time it might be much easier to change - and less error-prone - that on 1st.

Even easier done if the user is somebody else.

( if i tell u beforehand , that this, this and that should not be the way they are, or should be in some specific way, u may not believe me. "Who in hir right mind will ever use it like that?" ...well... maybe noone. Only when/if u hit/sit the nail on the sharp side, u find out which is what, for yourself )

have fun

Learn from some of the best. For example read and do the exercises of SICP followed by "Software Design for Flexibility - How to avoid programming yourself into a Corner". The authors have more than 50y of experience and go through multiple iterations and refactorings of examples, pointing out good and bad aspects of the code.
I have submitted PRs to Github repos that had proper, strict code review in place. That was as closest I've gotten to code mentoring
https://exercism.org/ is a nice place to start.
I don't know... it might be a nice start to test some coding skills but the level is a bit off. Something like 'create a ring buffer' is rated as 'hard'...
Find retired programmers. Buy them coffee.
But I can already read unending COBOL rants online?
All jokes aside.

COBOL ranters rarely make it to retirement age, 60/65.

Usually only intelligent, die hard, hardened professionals, make it there.

Find the real thing.