
How to be a wizard programmer - knoxa2511
https://twitter.com/b0rk/status/755020037979856896
======
weego
I'm going to be the token buzz-kill senior dev:

If you run into problems none of the senior devs have experience in and have
no answers for, my first concern is that you're massively over complicating
something we've solved in a simpler and less risk-exposed way. My second
concern is that you're intentionally reinventing the wheel in a way that is
massively over complicating something we've solved in a simpler and less risk-
exposed way just for your own interest.

~~~
lojack
OP is proposing you solve the problem if no one else has a solution. You are
proposing to solve the problem by simplifying. I don't think these need to be
mutually exclusive pieces of advice.

~~~
kedean
I think what he's trying to say is that if you find yourself with problems
that none of the senior people have had to solve before, it's very likely that
you are modeling the target system as the wrong problem. As a strawman
example, "how can i make a new class inherit from multiple classes" is
attacking the wrong problem (multiple inheritance), but a junior person might
not be aware that it's the wrong problem.

~~~
terrywilcox
Or the question is "can we solve this better with the actor model", which is
what I asked my team last week.

None of us has any experience with the actor model, but rather than dismissing
the question, we're investigating.

If the senior people have never had to solve the problem before, how can they
know if it's a valid problem?

------
MichaelBurge
I once wrote some code that unintentionally smashed the interpreter's error-
tracking data structure at compile-time. If you had even the slightest error
in that module, like a misspelled variable name or type error or unknown
function, you'd just get "Unknown error".

I never bothered to fix it, so I believe it's still in production. You better
hope you're not assigned to maintain that module.

The one bug at my last job that gave me trouble was one where somebody deep in
the stack called the C close() on a filehandle managed by the interpreter. The
bug report was "My reports are showing up empty when I run them". The language
interpreter kept track of its filehandles separately and wasn't informed about
the close, and this led to an off-by-one error when you later went to write to
a language-managed filehandle. I noticed stat'ing the filehandle gave a
different inode than the temporary file it was supposed to be opening. I moved
over to an ext4 filesystem so I could use the debugfs command to look up the
inode, but the error only showed up on the same xfs filesystem. A brute-force
search of the filesystem turned out that the report was being written to one
of my Perl source files, which was opened read-only and so the writes were
being rejected. The commit that introduced the error caused it by adding an
include, which shuffled the order that filehandles get allocated, which
exposed the off-by-1 error that had been around for 10 years which usually
didn't cause any trouble.

Took me a solid week to track that one down.

------
tubs
Until the more senior member quits because they are wasting the vast majority
of their time answering questions that could have been answered by _just
trying_ for more than 30seconds after hitting an obstacle...

~~~
JoshTriplett
You're demonstrating why people become afraid to ask questions, and stop doing
so even when they should.

I'd much rather have someone ask when they get stuck, or even if they're kinda
stuck. If someone happens to ask me a question that's easily found via poking
around a bit more, I'll show them how they could have found the answer, and
then they'll have learned _two_ things: the thing they wanted to know and a
new pattern for solving problems.

As a result, I rapidly find myself surrounded by people who ask smarter and
smarter questions, and who can solve harder and harder problems. And I love
that result.

~~~
lubonay
Somewhat inexperienced team leader here. IMO, working on improving the team's
knowledge as a whole is so much more rewarding than working on your own
knowledge and snapping at people who want you to share it.

The style I favor when the junior devs ask me questions is to ask questions
right back at them, kind of like in a Socratic dialogue. This makes them
reluctant to come to me for easy answers and think more about the problem
first.

In the end I get a team of people with steadily improving skills to whom I can
delegate ever more complex tasks.

~~~
stepanhruda
Thanks for this

------
ak39
It's amazing how encountering handwritten text, a scarce thing these days,
somehow grabs your attention immediately.

------
ricksplat
How to be a wizard programmer:

1\. Write Code

2\. Read Code

3\. Learn how to find out things for yourself

4\. Find new ways of doing things and contribute to the team

5\. Try to give more than you take

------
speeder
Something that made my coding skills jump: Attempting to reverse-engineer a
extremely large, and known to be well coded by wizards C++-based game.

I ended having to learn details on how C++ work (how vtables work? why?,
etc...), what some common stuff on the code was (reference-based smart
pointers, locks of various kinds, thread-related stuff, alignment-based custom
fast allocators, STLPort stuff, etc...), reading papers about why some things
were done that way (yep, the game I choose has lots of papers and talks about
its coding!), and so on.

In the end, I couldn't find any of the things I wanted to find, and couldn't
convince the game IP owner to let me patch some bugs I found (that are
actually killing the game review ratings on Steam), but I don't regret it one
bit, I felt like I learned in the 3 months I fiddled with that, the same
amount of information I needed to learn in 2 or 3 years of coding my own
projects.

~~~
mettamage
I'm curious what would work better. Reading and working for open-source
projects or reverse engineering like you did. I noticed that my coding skills
became better when I did a reverse engineering class, mainly because I needed
to debug a lot more than normal.

~~~
douche
Another great learning experience is taking a code base written in one
language and porting it to another. I keep poking around at the old IdTech
code and reimplementing parts of it. About the most productive thing I've
managed is an extractor for the Wolfenstein 3D graphics files, but I've had
fun and reviewed a lot of my C knowledge, along with some dusty corners of the
language I was porting into that I don't use much.

------
MIKarlsen
Tip #1 seems to be a brilliant way to get shouted at @ Stack Overflow...

------
collyw
Is wizard better than ninja or rockstar?

(Am I the only one that gets put of by job ads asking for nonsense titles like
these?)

~~~
stepanhruda
I think the hierarchy goes pirate, ninja, wizard, rockstar and guru.

/s

~~~
dozzie
Where is "commando" in there?

~~~
mxuribe
For many years now "commando" is no longer a title but rather a state; a state
where one lacks under garments, and of course a lack of support. ;-)

