5

Used to think I was a hot shit programmer. Self taught (mostly) and could make all sorts of shit happen. Then I started reading other people's codebases. I got a huge dose of humility. Learned a lot from other codebases in the process. Eventually after a lot of languages and lot of practice I got a programming only job. Started reading through the codebase. Holy shit there are way worse programmers than me. There is some really good code in there too, but 20 year old wtf code too. I assume my perspective comes from seeing what good code can be. I still have a lot to learn though. That is the fun part. You can spend a week on a minute detail of one language or one concept.

So here are a few fun questions:
1. What is the worst code, codebase, or programmer you ever met?
2. What it the best code, codebase, or programmer you ever met?

I have seen a few codebases on github that just told me to walk away. Some of the best code I have found has been in game engines. Probably because I look at a lot of game engine code (sampling bias).

The coolest library I have used has been Construct (Python lib). It is a reversible protocol library. It can deconstruct or construct a data stream.

Leaving the off by 1 or more error in my post.

Comments
  • 3
    Good questions.

    Answers regarding people in real life:

    1. A polish coworker. While I'm in general quite fond of east europe devs, this one was terrible. His source code looked like the file was written by several devs that always patched stuff. That's what he did, patched until it works and moving on. Fact is, he delivered very fast bad quality. He's pure fired by complains of other devs. The employer actually liked him because he was always the one saying "Of course that's possible, give me one hour!". I told my follow up (stopped being lead) that he was impossible and that guy (knew him well) said that i'm probably doing smth wrong regarding him. A few months later that guy was the cause firing him.

    2. A dev in my own neighborhood. He is amazing and drives a skyline. He ran over his laptop with it once. He was always rapping during coding. He wrote very specific code (nothing generic, one purpose) and just delivered hardcore. Velocity and delivering. That's what counts
  • 3
    Answers regarding stuff i've seen online.

    1. Wordpress, it's the biggest security issue i've ever seen. Templates can do SQL queries and it's very common to base on online templates. Peter Kassenaar. The Dutch book author that learned me to make sql injections.

    2. I've learned much from nginx source code and sqlite3. I've investigated sqlite3 recently and god, what can that guy write code! sqlite3 is a one-dev project and he doesn't want source code contributions. It's open source in the way that you're allowed to know the source, not to contribute for it. I do understand it very well - he has a certain set of skills and has a clear vision. With such clear vision of how to do things, it's not comfortable to work with others. Also Guido van Rossum (Dutch python inventor) and ofcourse Torvalds are amazing imho. They're all successful because they're good AND are all nazi's in someway. Believing in yourself is key is what they show. Be self made. Also huge fan of Bob Nystrom.
  • 2
    @retoor this reminds me of ID software releasing their early games as open source. Also reminds me of the Descent devs releasing their code too. They said they want people to see that production code isn't necessarily the best quality code. Which is a really interesting position to take.
  • 2
    Regarding own skills i'm happy, i'm good in the parts that matter to me. That includes professional soft skills regarding ticket administration and project management.

    I have two major down sides tho:

    - I can't visually design anything. Literally. The visual template of my chatbot is GPT generated. People care too much about design to use my own.

    - I can't write nice consistent documentation for some reason while i'm very consistent in coding. I have no idea how it's possible, i can talk unlimited about my work and do understand everything on a deep level. So why can't i document?

    On job interviews where I apply as backend developer I always joke that i've never made smth beautiful (to emphasize i'm backend) and people think it's funny to say such stuff. But it's really true. I did almost every common language professionally in exception of C, C++ and Rust. First one can't find a job in. C++ has too many ways to rome. Rust syntax just doesn't attract me. I love malloc
  • 1
    @Demolishun since you're a professional C dev, please take a look at my (start) of an ORM in C: https://retoor.molodetz.nl/retoor/.... It's in development. Be aware - it's made to have a beautiful easy API that is both usable in C and in Python using shared object. Look the sorm.py to see how I got variadic args implemented in both C and Python.

    Can you tell me if you see some very obvious mistakes? I wrote a lot C, but do not have many C devs in my environment and no professional experience in it because there are no software jobs in it. It's all embedded and PLC-related. But also in PLC world it becomes more bascom and stuff. Mitsubishi and Siemens both prefer other language afaik. I've did automation with Delphi in a factory regarding HUGE recycling processes. Exited that job because the zero fault tolerance was a bit too much for a ~20? ~22? year old. Imagine also that most my age were still students and enjoying life and I was like - wtf i'm doing taking so much shit?
  • 2
    people always say you'll learn so much from reading others' code but that has never happened to me

    I've never found someone's code to be good

    I don't know what's wrong with me

    I can spot when people have a natural talent for coding though. seems either you can code well or you can't, and it's really obvious early on

    I met a guy in screeps I was TREMEDOUSLY fascinated about. still remember his name. mastodon. I don't know who he was. he was in the same block as me, he was a newbie, and he conquered the whole game just about in a month. I saw his codebase's functionality evolve over time, and he must've been a god. then he left because he won everything and probably got bored. I never talked to the guy and I wish I did. the rare times I meet someone impressive I get like, too nervous. wish I saw his code, too

    ---

    most code I encounter I could rewrite in 1/10th the lines and remove all that convoluted logic, so that's for "worst". everything is the worst.
  • 3
    The more you know the more you understand you know nothing.

    That's one big truth that never fails.

    If you think you know, you're too young and inexperienced to know
  • 3
    @Hazarth stages in development:

    - beginner, i don't understand all those libs because i barely know the language and will do it myself instead of using libs. Libs are intimidating.

    - bit experienced, able to learn and use stuff from others. You're not gonna make shit yourself right? Let's glue everything together! Progress!

    - hmm, I need only certain functionality from a lib. let's find out how it works and write my own. And then making it actually better.

    It starts and ends with doing shit yourself. Many devs keep stuck in the middle. Sadly, the one in the middle is kinda the job mostly. During job you can't write your own libs for sake of quality. You're stuck with TTM
Add Comment