
I am a mediocre developer - janvdberg
https://dev.to/sobolevn/i-am-a-mediocre-developer--30hn
======
cocktailpeanuts
You can't possibly be a "mediocre developer" if you do all that mentioned in
the article. I guess that was the joke :)

Re: "I google simplest things all the time", I once wrote my own regular
expression parser, context free grammar parser, etc. in Lisp, Python, Perl,
and JavaScript.

But to this day I still have to google javascript syntax to work with regular
expression for certain things.

Memory is no longer a competitive advantage, the real competitive advantage is
the ability and discipline to do everything OP talks about in the post

~~~
sjapkee
He uses good practices, but at the time he can be bad dev. Because programming
isn't about variable naming and etc. It's about writing working algorithms and
if you can't do this, then nobody cares how good you at not writing working
things.

~~~
didymospl
If programming is really about writing algorithms then why people(both
candidates and employers) complain about whiteboard interviews? I think that
most of the programming done today are in fact declarative due to abundance of
high-level languages frameworks, libraries and other great tools that abstract
business logic away from the low level imperative instructions. Obviously it's
good to know how everything works behind the scenes but I know many people who
are far less familiar with the CS basics than me yet they are tremendously
more productive in software development.

~~~
sjapkee
If all your work is to read/write data from DB and represent it in different
ways, then yes, you can know absolutely nothing, use standard framework
functions and be stackoverflow developer 8/5\. But if you need to write
something specific, something more complex, you can't just take two functions
from your %framework_name% and make it beautiful and working. You should know
how to do it and furthermore, you should know how to do it with existing
tools. And here the majority begin to have problems.

~~~
mattmanser
Honest question, when's the last time you had to do that.

Second honest question, did you _have_ to do that, or did you do that because
it was Not Invented Here?

Virtually no-one in our industry needs to write algos regularly. If you are,
that probably means you're a bad programmer suffering from NIH syndrome. Or
you're one of a tiny group who actually need to because you're doing something
cutting edge.

~~~
sjapkee
It's shouldn't be cutting edge. There may be no open source library or
commercial library for your needs (e.g. parsers for most telecom protocols).
Your algorithms can be client specific. There may be only awful libraries
especially if you use a language in an area for which it is not designed (e.g.
something like C/C++ and Websockets). And there may be hundreds and thousands
of other reasons. Of course, many people use Spring/Boost/etc. for routines
like data transfer and popular protocols (JSON/XML) parsing, but it's only
part of big picture.

------
LandR
Sounds like most developers, honestly.

I think about 5% of all developers out there nowadays are actually good
developers. IME, most would have no idea what to do if you took away
stackoverflow or their abstractions that make their day manageable.

A part of the problem might be that a lot I've met aren't at all interested in
development, it's a job and they like the pay. They also just see it as a
stepping stone to management.

When I do ask people at work how something actually works they rarely know. I
get told just use 'x' it hides all that stuff away for you!

When I bring up basic concepts around coding, and therefore issues in their
code, I get blank stares.

I mean, i've seen me having to explain to a C# dev with a few years experience
why something like the following didn't work:

    
    
        string s = "foobar";
        s.Substring(1, 2);
        Console.WriteLine(s);
    

He didn't know strings were immutable, didn't know how to understand the
documentation for Substring and had never heard of immutability.

Similarly, I've had to explain why something like the following prints 5 and
not 6:

    
    
        void Main()
        {
            int x = 5;
            Foo(x);
            Console.WriteLine(x);
        }
    
         void Foo(int x) => x++;
    
    

A developer this time who had no idea about reference types & value types.

I don't know how we fix this though. As the people hiring and doing the
interviews often don't know what they are doing either. So the blind hires the
blind.

~~~
abhishekjha
I am having difficulty believing that someone wouldn't know how variables are
scoped/refernced in function calls like the one you showed in the second
example.

About the immutablity of strings : Is it absolutely necessary for a string to
be immutable? What harm could it do otherwise? I learnt immutablity on my own
and apprently there's no such constraint in languages like C/C++, although the
same behaviour can be replicated using `const`.

I don't know C# but shouldn't `Console.WriteLine(s.Substring(1, 2));` have
worked. No need to worry about immutability, at least in this case.

~~~
LandR
Strings being immutable in .NET is a good thing, for a few reasons. e.g.
string pooling (less assembly bloat), string interning (performance) and
performance in general.

You also get linq style benefits, e.g.

    
    
        string s = "this is a string";    
        if(s.Substring(5).ToUpperInvariant().StartsWith("I"))
            Console.WriteLine("true");
        Console.WriteLine(s);
    

If strings weren't immutable, you'd have to copy s to avoid changing /
breaking it.

These are things that I would expect a .NET developer to know. They are basic
fundamentals.

~~~
whyever
> performance in general.

Really? Forcing you to copy whenever you want to modify gives you worse
performance.

> If strings weren't immutable, you'd have to copy s to avoid changing /
> breaking it.

That seems like a disadvantage to me. With mutable strings, you have the
option to modify it in place instead of being forced to copy.

~~~
krzat
Ideally you have strings that can be both mutable and immutable based on
context. C# is not that smart so they opted into the only other sane option.

------
Fradow
One thing that saved my bacon is to write scripts that test production data is
valid (for the few things that cannot be enforced by the DB, at least not
easily).

Invariably, those scripts found invalid data, which pointed to hard to spot
bugs. Catching those early saved me from having huge amounts of invalid data
to manually sort through.

~~~
hnarn
Do you want to give a quick example?

~~~
Fradow
Sure, let's say you have an organization, in which you have users and devices,
so users and devices have a nullable FK to organization. Also, a device can be
linked to a user, so a device has a nullable FK to a user.

Now, when a device is linked to a user, both should be on the same
organization, right? I don't see how to easily do that as a constraint (but I
have to admit my SQL skills is quite low, and I avoid bypassing the ORM).
Well, in production, devices might land somewhere else, and now you have a
device that is supposed to be on organization A which is linked to a user on
organization B, if you didn't force the organization when a device is linked
to a user.

Depending on your use case, it could be expected, an operational error, or
something that should be resolved automatically.

Edit: another example. We have a legacy system. Part of the data is supposed
to be mirrored on both new and legacy system, via API calls (I don't know of a
better way, I'm not a great dev, DB are different, not shared and on a
different provider). Well, check if they are actually the same from time to
time (at least the obvious stuff).

~~~
hnarn
>Now, when a device is linked to a user, both should be on the same
organization, right? I don't see how to easily do that as a constraint

I'm not exactly an expert when it comes to SQL either, but in this case
wouldn't it be better if the "Device" table had two columns: "UserOwner" and
"OrgOwner" which in turn have FK connections to "Users" and "Organizations".

If the logic is that every device is only owned by a user or an org (never
both) at any time, you could constrain: check(UserOwner is null or OrgOwner is
null).

------
mnm1
Not memorizing pointless shit (argument order, all function names, etc.) is
actually a sign of a skilled developer who uses memory for important things,
not things that can be looked up on Google in a second. Yes, if the Internet
drops all productivity stops, but that's not because everyone needs to copy
shit from stackoverflow every 2.5 seconds. Being able to develop without an
Internet connection ... whoopty fucking do. Not impressive at all (unless
you're trying to do well at a stupid whiteboarding interview) since without
Internet, I'm pretty sure all work grinds to a halt and it's a ridiculous
situation to prepare for. Why not code without computers (again, getting into
the territory of beyond stupid interviewing here, the only place where this
would be useful)? If you want to be a good developer, relying on memory and
memorization for trivial things is a terrible use of your own inner resources
as is trying to be productive in an environment without proper tools (no
Internet / computer to work on).

~~~
saintPirelli
Human memory doesn't work like your hard drive. The notion that you have some
sort of 'free disk space', because you don't remember function names is
ludicrous. Quite contrary, the more you train your memory, the more you can
remember.

~~~
mnm1
I didn't say it works like a hard drive. Yeah, the more I train, the more I
remember what I trained and remembering function names and argument order is
something I specifically don't want to do because I can only train my memory
for so long each day and I'd rather remember important things, not trivial
shit like that.

------
zaarn
I would argue that OP isn't mediocre if they accept their faults. I also
search on SO a lot ("how to check for string prefix in PHP" or my favorite
"php variable reference").

A good programmer is someone who can see the architecture of a program when
given a high-level description of the problem. Someone who I can realistically
tell "write me a program to backup my files" and will end up writing a
reasonable backup system. Someone who I can task with coming up with an
application protocol with certain constraints. In short, someone who can be an
artist, engineer or scientist depending on what is needed.

Good practices are largely irrelevant to being a good developer, you can be a
good dev writing spaghetti code and a bad dev using TDD and OOP.

------
ggm
I'd kill to be mediocre. Being a _bad_ developer is my pinnacle achievement.

------
alkonaut
This blog post has the paradoxal property that the act of writing seems to
immediately contradict it. This person does not seem mediocre. He's humble,
that goes a long way.

------
hodl
Good tooling can save you a lot of googling mentioned here. Your editor should
tell you the required order of arguments, for example.

------
saintPirelli
I'm not even a mediocre developer, since I'm just a hobbyist, but I have found
it extremely helpful to invest the time and just sit down with a printed out
'cheat sheet' and learn standard library functions and standard packages and
their functions by heart. Just recently did it with peewee.

~~~
photonios
Do you feel this significantly speeds up development?

I've always found this a pointless exercise since I can get the answer I need
with a quick Google search. After working with a language or library for some
time, most of these things become muscle memory.

Rather than making a conscious effort to remember all of these things, I let
my brain unconsciously decide what's important enough to remember.

~~~
saintPirelli
I think it does. Not because I save the time of the Google search, but I can
apply the functions and methods without distraction. Sure, a quick websearch
is nothing that really holds you back in terms of time spent, but it opens a
new tab in your browser _and_ your brain and will divert your attention away
from solving the actual problem you are working on.

------
ralphm
A great keynote by Jacob Kaplan-Moss at PyCon 2015 along similar lines:
[https://www.youtube.com/watch?v=hIJdFxYlEKE](https://www.youtube.com/watch?v=hIJdFxYlEKE)

------
ld00d
As a more mediocre developer than the author, I would add that instead of
copy-pasting code, you actually type it out. This makes it _stick_ better for
me.

