"We Ran Out Of Columns" - The Worst Codebase Ever

Поделиться
HTML-код
  • Опубликовано: 28 окт 2024

Комментарии • 952

  • @Volvith
    @Volvith 2 месяца назад +1078

    I don't know why, but this codebase has post-collapse cyberpunk vibes.
    Like, just mashing together highly complex and extremely sophisticated machines to create a desk fan.
    It's beautiful.

    • @FireStormOOO_
      @FireStormOOO_ 2 месяца назад +129

      There's an entire Kubernetes stack controlling the fan's rotation servo. 7 microservices are involved in accepting updates to the desired rotation angles over WiFi. That lives on a slick webpage that works in any browser. But changing the fan speed is in a different portal that needs to load ActiveX components and requires IE 6. The fan has no buttons.

    • @manudehanoi
      @manudehanoi 2 месяца назад +6

      @@FireStormOOO_ oh shit activeX lololol

    • @alicaljungberg3742
      @alicaljungberg3742 2 месяца назад +1

      @@FireStormOOO_ beautiful

    • @Fierce0Deity0Link
      @Fierce0Deity0Link 2 месяца назад +7

      Space Station 13 servers in a nutshell

    • @uncannysnake
      @uncannysnake Месяц назад +1

      Warhammer 40k type beat

  • @tullochgorum6323
    @tullochgorum6323 2 месяца назад +1517

    If you want an insight into the quality of corporate code, you only have to look at the scandal of Fujitsu's POS system for the Post Office in the UK - the cause of the greatest miscarriage of justice in our history. At the public enquiry, multiple witnesses have attested to the shambolic development process - no proper specs or docs, no coding standards, inept developers and no effective testing. And yet the company doubled down and allowed hundreds of postmasters to be bankrupted and even imprisoned for cash shortfalls caused by their bugs.

    • @GreedoShot
      @GreedoShot 2 месяца назад +181

      I'm updating production code and having to rewrite failing tests
      The tests don't test anything they just exist to meet coverage requirements

    • @tullochgorum6323
      @tullochgorum6323 2 месяца назад +44

      @@GreedoShot What are you suggesting here - that you install a complex POS and accounting system into 12,000 branches without testing that it actually works?

    • @philstanton8912
      @philstanton8912 2 месяца назад +46

      As a software engineer working in the corporate world, I can agree that nearly all the code is trash

    • @monad_tcp
      @monad_tcp 2 месяца назад

      POS means piece of sh

    • @monad_tcp
      @monad_tcp 2 месяца назад +18

      ​@@GreedoShot typical , play stupid games, win stupid prizes
      At least you have 100% coverage , am I right ?

  • @xCheddarB0b42x
    @xCheddarB0b42x 2 месяца назад +860

    "I want ten year old production code to be open sourced and fed to LLMs for training."
    Sounds like poisoned training data. XD

    • @rndmvar
      @rndmvar 2 месяца назад

      It's the new "Google Translate an instruction manual through thirty languages, and then back to English", but for programming. The future is stupid. And just wait till they use all the code that H1Bs poorly copy pasta'd from StackOverflow, as LLM training material. Then LLMs can truly "do the needful" too!

    • @ElGuardianOculto
      @ElGuardianOculto 2 месяца назад +10

      oh that's hilarious

    • @thumperya
      @thumperya 2 месяца назад +3

      nah Intel thunderbolt utils is worse

    • @benjaminpierce8835
      @benjaminpierce8835 2 месяца назад +25

      nah, he is just playing 4d chess, we all know that would drive any emerging AGI straight into insanity.
      but if his gambit fails, he will have to answer for his deplorable crimes against the machine.

    • @neruneri
      @neruneri 23 дня назад +1

      Sounds like job security.

  • @bukem203
    @bukem203 2 месяца назад +434

    I worked for a pretty big gambling company and they stored javascript, html and css in columns in a MSSQL db. Before that i had never had a panic attack during a project overview meeting.

    • @thechosenone729
      @thechosenone729 2 месяца назад +60

      Reminds me the old days where senior dev was asked if we could implement new feature into program and the only respond you heard from across the room was "I have no idea." im glad we didn't get all kicked out from company 🤣

    • @HappyCheeryChap
      @HappyCheeryChap 2 месяца назад +33

      Storing code in the db... One of the many joys of using WordPress too.

    • @Bobbias
      @Bobbias 2 месяца назад +26

      I worked in a factory where their internal production management and quality tracking system was custom built in house (by someone who was entirely self taught). Not only did it store HTML in an SQL db (not sure which server) but it had raw SQL queries in JavaScript and using simple string concatenation to build queries such that little Bobby drop tables would have a field day.
      When I discovered this I brought it up to the poor sod tasked with maintaining this mess (since the creator had since left and turned this codebase into a commercial product and started a company selling it) they just shrugged.

    • @xybersurfer
      @xybersurfer 2 месяца назад +2

      i have also encountered HTML in the database (it was bad). unless the system actually needs to be that dynamic, it's a bad design. it's bad when it's the same HTML every time with only specific portions that vary. someone mentioned WordPress, but i'm on the fence about that as it stores plugins (i don't really know the WordPress internals though)

    • @bukem203
      @bukem203 2 месяца назад

      @@xybersurfer The css and js part really tripped me up. Creating dynamic css by writing SQL statements, i actually refused to touch any of the javascript. I guess a blessing in disguise because i learnt all the new fancy css things.

  • @mikicerise6250
    @mikicerise6250 2 месяца назад +422

    Legit. The cleanest code I've ever seen was written by students at school, it's all be downhill from there. Every single thing you learned not to do is what you find done in corporate. xD

    • @jambonmusical2689
      @jambonmusical2689 2 месяца назад +21

      just because you're told not to do it doesn't mean it's not faster to do it rn, will it break in a year, probably, but whatever.

    • @crispybatman480
      @crispybatman480 2 месяца назад +47

      ​@@jambonmusical2689The old "good enough vs done right" struggle. Short-term financial gain almost always leads to "good enough" and a growing pile of tech debt.

    • @ipodtouch470
      @ipodtouch470 2 месяца назад +10

      That makes me very worried. I have seen what my classmates have cobbled together. That gets the job done.

    • @troybaxter
      @troybaxter 2 месяца назад

      Yep... Looking at you Siemens with your abhorrent structure for Step 7 and WinCC... My God, their software is so dog water that it reminds me of programs I saw growing up in the early 2000s.

    • @89TStefan
      @89TStefan Месяц назад +4

      Of course it is the cleanest code because you only work on this projects on your own.
      If you design the codebase completely on your own, it is far easier to do so than in a project where >100 people worked on and > 200 people who worked on left the company a while ago. Very often you have to do and to work with legacy systems.
      And those work for a good reason how they do.
      And it is very easy to judge in retrospective from your current knowledge rather than at the time when people actually wrote that code.

  • @metroid1122
    @metroid1122 2 месяца назад +554

    I am genuinely scared by the fact the database the guy is talking about is eerily similar to the database of a company I've worked on before

    • @dixztube
      @dixztube 2 месяца назад +3

      Who is it

    • @Volvith
      @Volvith 2 месяца назад +66

      There's multiple of these space-hulk type codebases out there, in the depths of the unexplored overgrowth.
      Don't worry too much.
      ...
      But same lol.

    • @iraniansuperhacker4382
      @iraniansuperhacker4382 2 месяца назад

      @@Volvith you guys are forgetting to factor in all the smaller scale stuff glued together at large local businesses. I worked my regions largest car dealership as a web developer and the dude that made the database was a idiot husband of someone who was in the company family and he had no idea what he was talking about. We were just automating the business office so our sever never really had more then a couple hundred users but the database was so bad they had to go in and manually make some of the basic queries not time out at 2 minutes. It was a couple hundred thousands for that small project by the time I had gotten hired and it was wild. The idiot lead guy and the second in charge were using notepad++ and ftping into the same server. They would overwrite each others code intentionally. They would sabotage each others code intentionally. Eventually they fired me because they told me to start ripping social security numbers out of some other licensed software they used and store social security numbers + other personal information in plain text and I said no. Management actually told me I was crazy because I said that storing social security numbers in base 64 isnt encryption.

    • @alessandroblue7
      @alessandroblue7 Месяц назад +3

      you have no idea bro... i'm gonna tell ya a company with the same systems and trash software here, let's see how many will find it: FCA (yes the automobile group Fiat Chrysler Automobiles) I can't tell you much more but trust me you would want to rm -rf your brain after seeing it...

    • @sloppyy
      @sloppyy Месяц назад +1

      kevin from the office asking martin nash to explain insider trading

  • @terryjophlin
    @terryjophlin 2 месяца назад +581

    I manage a database for my company that was designed by the guy who came before me. No joke. That guy stepped in front of a train. Anyway, there is a table in this database where the primary key is integers 1 through 36. The values associated with each of those primary keys is also integers. 1 through 36. That's the table. And if you delete it, it breaks the whole database.

    • @raptorate2872
      @raptorate2872 2 месяца назад +59

      It's probably for a good reason that's usually not apparent at first glance. Look at the code utilising the table to understand why. Primeagen had already mentioned this, usually things like this are done for a good reason and it takes you a while to understand why.

    • @0oShwavyo0
      @0oShwavyo0 2 месяца назад +145

      @raptorate2872 I appreciate that having humility and giving the benefit of the doubt are great qualities in the workplace, but this is the youtube comments section. I am wracking my brain to come up with literally any logical explanation for what OP described, and I am coming up 100% blank. Maybe you can enlighten us?

    • @vytah
      @vytah 2 месяца назад +59

      Maybe the code was supposed to map from some ids to other ids because some ids could be aliases used for different purposes, but in the end there was no need for extra aliases and the table ended up being trivial?

    • @0oShwavyo0
      @0oShwavyo0 2 месяца назад +42

      I suppose it is entirely possible that it is 100% coincidental that the 1st 36 values were the integers 1-36, and maybe there was no reason this data couldn’t change in the future or that new data could be added that doesn’t conform to the pattern. It would seem highly improbable, but maybe it’s just pure happenstance that the table appears to be pointless, and the next record could be fk 37 with value of 92738. If that’s genuinely the case then just wow.

    • @terryjophlin
      @terryjophlin 2 месяца назад +117

      @@raptorate2872 it is literally because there is geographic data in the database, and 1 through 36 are the section numbers in a township and rather than type the section number, he thought it would be 'cool' to have a lookup for it. So instead of typing 1 for Section 1 of the township, you type 1 for the lookup, and it fetches the 1 for you. Probably pretty easy to resolve, if I wanted to. But the guy was my friend, and now he's gone, and I don't want to untangle his beautiful messes. (That came out a lot less hetero than intended.)

  • @apefu
    @apefu 2 месяца назад +875

    How JSON showed up in our production database?
    "I'll dump this here for convenience until I write a generator. People will use the method to retrieve this anyway."
    Two weeks later: "Nice, it is done."
    Two minutes later still: "Kill me, please. How is this column already called from over 100 places in the code? Why didn't they use the method?"
    The name of the column? never_use

    • @groebestie5594
      @groebestie5594 2 месяца назад

      Reminds me of the react GitHub issue of someone asking if it is safe to use the stuff under __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED

    • @chri-k
      @chri-k 2 месяца назад +128

      "never_use"
      I wonder what that stands for?

    • @jasonieong7772
      @jasonieong7772 2 месяца назад +156

      Should have called this __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED

    • @eriknystrom9293
      @eriknystrom9293 2 месяца назад +71

      @@jasonieong7772 jokes on you, I used it in order to be fired. Now I am mad.

    • @privacyvalued4134
      @privacyvalued4134 2 месяца назад +27

      There's nothing wrong with a JSON blob in a database. In fact, it's how I design all my database tables. Works great. You only need to have columns where you are going to apply indexes to. The data in those columns originates from the JSON blob. So, yes, you have some data duplication, but then your application can both search really fast via indexes and also expand a complex object in the application. JSON is supported in every language. You can also technically search on the JSON blob using DB queries but those will inevitably be slower. To solve that problem, you add "archive" tables where old data periodically gets moved into the archive.

  • @PapstJL4U
    @PapstJL4U 2 месяца назад +215

    When someone says "its Year X, you should use Y already", I don't think they had lots of longstanding customers. I want to see them how they argue, that the customer should switch to a new database and transfer 10+ years of medical, finanical, structural data.

    • @jamess.2491
      @jamess.2491 2 месяца назад +29

      Just because a technology is new does not mean that's a good reason to transition, frankly in today's interdependency hell I would argue the opposite. Unless there are viable business incentives to transition, all you're doing is hurting yourself.

    • @Weaseldog2001
      @Weaseldog2001 2 месяца назад +21

      The last company I worked for that did medical records, had automatic migration policies.
      The customer had a defined interface to the database.
      The database could be updated, without changing that interface.
      If the customer is using your raw data tables, you have a bad design.

    • @darekmistrz4364
      @darekmistrz4364 2 месяца назад +2

      @@jamess.2491 Survivor bias

    • @xybersurfer
      @xybersurfer 2 месяца назад

      @@darekmistrz4364 i think Path Dependence is the phrase you are looking for

    • @xybersurfer
      @xybersurfer 2 месяца назад +1

      @@jamess.2491 this is true, but often we are also blind to how not using a new technology is "hurting"

  • @kyda7972
    @kyda7972 2 месяца назад +131

    I once worked in a company where I learned there's a hard limit on how many elseif statements you can have in C++, since they are essentially just differently formatted nested if statements, and they have a limit too. There were multiple files where they hit the limit. The solution? Just start a new if statement and pray to god it works. Of course, I spend days just figuring out this was the cause of a bug I was hunting. I never thought that somewhere in those thousands of lines the else-if just stopped and started with a new if.

    • @ayporos
      @ayporos 2 месяца назад +34

      else-if statements make me nervous because 9 out of 10 times as I am writing those, and I stop to think for a few minutes, I realize I'm approaching the problem completely stupidly and can refactor it into a single evaluation :)

    • @Internetzspacezshipz
      @Internetzspacezshipz 2 месяца назад +9

      what. the. fuck. Dude if I saw that I would 100000000% rewrite it as something a bit more sane... Even if it took me months, even if it got me fired for not "being productive".

    • @CoughSyrup
      @CoughSyrup 2 месяца назад +7

      Jesus Creeping Christ. Well that is an interesting bit of trivia I'll have to remember. Then I can casually drop that little tidbit next time devs are telling war stories. The implication being, anyone who knows that fact has seen some serious shit.

    • @edwardallenthree
      @edwardallenthree 2 месяца назад

      Nobody likes the select...case syntax. I mean I'm sure there's somebody out there who likes it but they're weird. However, it does serve a purpose. It's also pretty fast.

    • @matthewsheeran
      @matthewsheeran 2 месяца назад +1

      Methinks this must be an urban myth as the if else's just compile to branch's I can't see any limits.

  • @NostraDavid2
    @NostraDavid2 2 месяца назад +117

    Fun fact: the original Relational Model (the basis of relational databases) did not use names for columns, but index numbers. That was 1969 (nice) - by the 1990s Codd had found people who were using over 128 columns, so he decided using names was better than remembering that column 36 was the surname of a user.

    • @lolilollolilol7773
      @lolilollolilol7773 2 месяца назад +24

      it's less surprising when you understand that for him, it was all mathematics and in his head, tables were matrices.

    • @lerpmmo
      @lerpmmo 2 месяца назад +3

      maybe they expected the them to use enums.

    • @NickTheCodeMechanic
      @NickTheCodeMechanic 2 месяца назад

      @@lerpmmo Don't even joke about enums.

    • @tissuepaper9962
      @tissuepaper9962 Месяц назад +1

      ​@@NickTheCodeMechanicenums are good, actually

    • @NickTheCodeMechanic
      @NickTheCodeMechanic Месяц назад

      @@tissuepaper9962 better than Java enums 😀

  • @steffennilsen2132
    @steffennilsen2132 2 месяца назад +115

    I cant wrap my head around the calendar table. Running out of columns is one thing, poor design and all, but be unable to login if you ran out of calendar entries? What am I even reading, how?

    • @amehybrid
      @amehybrid 2 месяца назад +20

      I think the calendar table would be used to quickly calculate N business days from current date. I think it is manually updated to allow for changes in holidays every year.

    • @videcomp
      @videcomp 2 месяца назад +33

      @@amehybrid You may be on to something. I worked on a timekeeping system that had to account for holidays in different jurisdictions. In some places, people were legally required to pay double if they worked on Good Friday. Have you ever tried to automate a calendar setting that has a mixture of solar, lunar, and ecclesiastical factors? I figured it out, but I still think it may need an adjustment in 100 years or so.

    • @vchap01
      @vchap01 2 месяца назад +1

      Some applications use different calendar types. You have a typical Gregorian calendar. Then you have a fiscal calendar where the first month of the year is October and days start on Monday. Broadcast television calendar uses "square" months where a month can start on the 27th of the previous month. Then you have calendar type/month/quarter/year values in other tables.

    • @ayporos
      @ayporos 2 месяца назад +2

      At my company plenty of our codebase relies on a (working days) calendar table.
      I remember in the past we had a codebase (luckily taken out of use now) that had its own internal calendar table, but for some reason the dev only added a year of dates at a time. So every time Januari rolled around it would stop working until somebody poked the dev that maintained it and he remembered he had to update that.

    • @bandobandit353
      @bandobandit353 2 месяца назад +1

      We have a similar thing in our company. A scheduler table where you have to manually insert records otherwise a critical job wouldn’t happen. The guy that wrote this put a comment in his hand over docs that said every December you needed to add records for the coming year…

  • @Volvith
    @Volvith 2 месяца назад +64

    I work as a support engineer for a company that manages the infrastructure of at least 200 companies. A couple big ones, _and a whole lot of truly sketchy shit._
    We have a lot of legacy customers as well, that got rolled over from other tiny support companies we ate. (we's a growin' boye)
    Let me just summarize how horrible it can get in one sentence: _I genuinely think we've found more bugs in Microsoft's code than any other company on the planet. And it's not even our job._
    I love my job, but God bless the soul of anyone picking up the phone for a customer that nobody recognizes. Because either they just got rolled over from some tiny shit creeck company we took over from, or even worse, _it's the first time in 6 years they called, and you're about to meet the end-boss of DIY legacy code._

    • @gamingczsk8136
      @gamingczsk8136 2 месяца назад +6

      Elaborate more on your stories, the wisdom proufound will must be

    • @sisterfister7891
      @sisterfister7891 2 месяца назад +3

      _Tell us more?_

  • @MatthijsvanDuin
    @MatthijsvanDuin 2 месяца назад +22

    0:20 Actually by default it's max 2000 columns for sqlite, but you can bump the limit to 32767 if you compile the library with custom config

    • @jordanhildebrandt3705
      @jordanhildebrandt3705 2 месяца назад +5

      DON'T GIVE THEM IDEAS!

    • @MatthijsvanDuin
      @MatthijsvanDuin 2 месяца назад

      @@jordanhildebrandt3705 I mean, really, since sqlite has dynamically typed columns, you can just make any table a 3-column one (row_id, column_name, value) with unique(row_id, column_name) and then you can have as many columns as you want and even dynamically generate columns! ;-)

  • @deenaxic9134
    @deenaxic9134 2 месяца назад +87

    Corporate code vs. hobby code..... Don't assume corporate means better. It's convoluted, hotfixed, non optimized, ... But that's since you used 100 times more time on your hobby code, than any manager will allow an employee.

    • @troybaxter
      @troybaxter 2 месяца назад

      Agreed. Ever since I got into the real world, I really started to notice this. Hell, even professional software (**cough TIA Portal, WinCC, and EPLAN**) can be beyond absolute garbage.

    • @ir0nsight280
      @ir0nsight280 Месяц назад +6

      Yeah
      the key difference is that i feel shame if i push garbage code on my personal project to a public repo
      but noone cares or will ever shame me for garbage code i write in the proprietary repo at work. Usually you are even discouraged to take more time to refactor/clean up your code, becuase "customer wants new feature NOW not in 2 days"
      and then it takes 2 senior devs a month to clean up my mess 3 years later costing 100 times more

    • @ThylineTheGay
      @ThylineTheGay Месяц назад +1

      it's like, idk, sewing as a hobby vs for a fast fashion corp

    • @DerekSeymour-f3b
      @DerekSeymour-f3b Месяц назад

      Hobby code is almost always 100% better. However, you need that skill to get down and dirty, too, and work fast cleaning up the poop.

    • @jfpinero
      @jfpinero Месяц назад

      You've worked at shitty places it seems

  • @Shogoeu
    @Shogoeu 2 месяца назад +30

    It’s 2024 - one of our system uses a table “calendar” and we had a production bug that stopped all our analysis because the script that was responsible to renew the “calendar” was crashing for a couple of months and no one knew and the analytical queries depended on it…
    We also have the CSV thingy. It’s anecdotal, but companies run like this even now.

  • @AlecMaly
    @AlecMaly 2 месяца назад +246

    Paused at 8:45 to take a breath.
    I can feel the imposter syndrome leaving my body.

    • @chizidotdev
      @chizidotdev 2 месяца назад +7

      Bruhhhh😂😂😂 This is too realll

    • @HksjJkdkd
      @HksjJkdkd 2 месяца назад +3

      I program since 8 months, i am in no means good but when buidling an application for a database i went and made all transcations and componets modular so that you cloud change for example a players team mid game without the app crashing. And hearing they do everything what was said. I feel like an Senior Dev 😂

    • @rezniks30
      @rezniks30 2 месяца назад +2

      I was about to comment the exact same thing lol. Next week is going to be good bro. We are going to be flying.

  • @Divus90
    @Divus90 2 месяца назад +37

    The beaty of over the top solutions is more that it's more of an "art" rather than engineering. It should be place in gallery for software engineers so they could reflect on their life, while looking at this art.

  • @0xdiane
    @0xdiane 2 месяца назад +11

    I have a much less exciting version of this. We ran out of tables AND columns (of our paid cms). At one point we had to embed JSON of a “new table” in another table that was mostly just used to store strings. Literally if we wanted to do select statements from one “table” we would instead query a different table, filter the rows, convert string to json, extract what we need. Holy moly.
    Company no longer exists

  • @matthewread9001
    @matthewread9001 2 месяца назад +14

    11:50 as someone who took a database class working in SQL server, writing, queries and other stuff. And who loves back in development. If I was an intern, I probably would have written that application to make those SQL statements… And then not told anybody so I could get my eight hours of work done in Three minutes Just running my application

  • @05xpeter
    @05xpeter 2 месяца назад +85

    I take unorganised chaos and direct talk to customers over enterprise design patterns and 1 year plans any day of the week.

    • @NickTheCodeMechanic
      @NickTheCodeMechanic 2 месяца назад +1

      Right on! I hate design patterns, especially when paired with OOP inheritance hierarchies! I can only imagine how insane backend architect 'design patterns' are...

  • @Cxntrxl
    @Cxntrxl 2 месяца назад +5

    I work for a supermarket chain and this video has made me realise that the POS machines freezing every 2 minutes or so is probably not the fault of their ancient hardware
    Don’t even get me started on when a technician working on the self serve registers told me the error we were having was caused by the register getting stuck in a while loop and the only way to break it out was to cause another error by physically removing the receipt roll from the printer.

  • @theftking
    @theftking 2 месяца назад +189

    "Squeal" instead of "sequel" is triggering.

    • @zdazeeeh
      @zdazeeeh 2 месяца назад +17

      I could barely watch

    • @ideallyyours
      @ideallyyours 2 месяца назад +21

      The correct initialism is obviously SQUIRREL

    • @eamonburns9597
      @eamonburns9597 2 месяца назад

      It is the only way of pronouncing it

    • @AndrewGrofff
      @AndrewGrofff 2 месяца назад +10

      He must do it just to cause us pain? There's no way someone unironically says squeal 😶

    • @Johncw87
      @Johncw87 2 месяца назад +16

      I say both are awful. SQL is an acronym that doesn't form a word. Stop trying to force it into one.

  • @goatfryed5464
    @goatfryed5464 2 месяца назад +20

    With this kewill reflection thing, I think he missed the most beautiful point. This sounds so weird, so problematic, so hellish. Colleagues told him not to dive into it, because they knew what weird magic shit show he'd find. Everybody gave up. But he found it. SOMEONE HAD DISABLED A CRONJOB. That weird reflection on empty glasses was still working. That incredible weird part. That part was fine. WTF 😂

    • @xylxylxylxyl
      @xylxylxylxyl Месяц назад

      the reflection of empty classes is actually pretty cool/smart imo.

  • @eriknystrom9293
    @eriknystrom9293 2 месяца назад +19

    1:10 - This hit way too close to home. I do a worse job at work since there are:
    1. Time pressure (partly as a function of me/my team not being good enough to fight against as much as we should)
    2. Social pressure and general social negotiations that cause the code to become a mish-mash of styles and quality levels. Yes, even with code reviews and pair programming. You are not immune.
    3. You are not coding your baby all the time. Sure, the best times are when you can fully gaslight yourself to go in with that mindset, but every once in a while it just... fails to materialize to the extent that you want. If the project is not very short this can thankfully be overcome.

  • @gund_ua
    @gund_ua 2 месяца назад +7

    This is simply beautiful.
    Now I'm dealing with a similarly messy monorepo codebase with react and I just embraced the chaos, concerns for code duplication and design are gone and it's now about just doing the thing that needs to be done.
    I hate react, but now with this new approach I kinda dont mind it anymore and found my peace with it.
    It's refreshing in some ways.

  • @EvanEdwards
    @EvanEdwards 2 месяца назад +113

    A bunch of people are essentially trying to reproduce this practice across the industry, only the name of the guy who gets the crappy CSV file and presses the button that may or may not import business critical changes to the database is named Devin. Making your core business processes unknown magic is sometimes necessary, but long term inexorably leads to terrifyingly fragile stacks of "just make it work" quick fixes.

    • @prashantkumarsrivastava1977
      @prashantkumarsrivastava1977 2 месяца назад

      1024 columns ?, i started sweating with barely 20 columns on my job and started breaking apart the SQL to pieces. To limit that.

    • @terryjophlin
      @terryjophlin 2 месяца назад +1

      @@EvanEdwards stacks and stacks and stacks.

    • @EvanEdwards
      @EvanEdwards 2 месяца назад +9

      @@terryjophlin Pretty much everything complex is built like that, software to submarines to shopping malls. You can usually have one unreliable layer, but multiple eventually causes failure. In Florida there was a concrete issue for a few years where bad concrete was unknowingly being shipped to new construction projects. Years later, high rises, parking garages, and large oceanfront condo towers started falling down, sometimes catastrophically collapsing with people inside. Most of them had a second factor contributing to the failure, like adding a floor above the original design, or moving the pillars just a few feet. Things that stretched tolerances and were almost always signed off on by an engineer, but they were unaware that those tolerances were already stretched by the substandard concrete mix.

  • @EdmondDantèsDE
    @EdmondDantèsDE 2 месяца назад +94

    Doing reflection on a hierarchy of classes and empty methods sounds unholy. 😂

    • @olbluelips
      @olbluelips 2 месяца назад +8

      Next stop, writing your own language

    • @fl-ri-
      @fl-ri- Месяц назад +8

      @@olbluelips Mate don't even start. I'm in a situation now where my company acquired some 15 years old financial planning company. Their software was written by one old boomer who decided to make a proprietary scripting language for HTML pages. His reasoning? Well they couldn't get the pages to work correctly in HTML and CSS... the scripting language transliterates directly into HTML and CSS.
      A few days ago I had a bug where a page refused to behave like I was telling it to. It was literally "Show these columns if they are not null". Turns out I was using "if (col[0] not null)" instead of "IF (col[0] not null)" and they are completely different in this proprietary language pile of wank.

    • @olbluelips
      @olbluelips Месяц назад +2

      @@fl-ri- case-sensitive conditionals? That’s just brilliant I’m stealing that

    • @fl-ri-
      @fl-ri- Месяц назад +1

      ​@@olbluelips You can understand why I spent 5 hours trying to debug it to find out why all my columns were null, right?

  • @gcewing
    @gcewing 2 месяца назад +9

    A manually populated calendar can make sense sometimes for things like public holidays that don't always follow a predictable pattern. But you shouldn't have to manually enter the *entire* calendar...

  • @programmer1356
    @programmer1356 2 месяца назад +81

    Running out of chars in col is even better. Text1, Text2, Comment1 etc

    • @MarcLucksch
      @MarcLucksch 2 месяца назад +19

      My last project ran into the problem that DB2 did not want to join more than 100 tables in a single query. The fix for this took me multiple months and was essentially a recreation of joins on the rich client. all table data was loaded into the client. This was also 23x faster than letting the database do it. (46 seconds to 2 seconds. But 1.7 seconds of that was jamming 40000 rows into a JTable)

    • @vytah
      @vytah 2 месяца назад +6

      @@MarcLucksch Did the DB have any indices? No need to answer, I'm assuming no.

    • @happykill123
      @happykill123 2 месяца назад

      I've seen Input1-21 in a knockout Jquery webb app, it is (yes, still exists and is maintained.) over 600 lines of code just to update their state.

    • @Adam92326
      @Adam92326 2 месяца назад +8

      ah I had that at my previous work. Bank was like, no worry, only small comments. Some of the small comments extended into 17000 characters.

    • @MarcLucksch
      @MarcLucksch 2 месяца назад +7

      @@vytah it does, it was actually quite optimized to even work at all, just the amount of data duplication due to joins was insane. Just by loading each text string only once I reduced the amount of data send by the server from 3GB per query to less than 200MB

  • @webkinskid
    @webkinskid 2 месяца назад +11

    I lost it at "when the calendar runs out, we can't login to the system" lmao

  • @AI-dz2zd
    @AI-dz2zd 2 месяца назад +28

    We had a job that did pivot 3000+ columns on a daily.. including over9000 unions, 50+ table joins, casts, UDFs you name it. Quant who wrote it, modified it regularly, and when it broke (after each update), we had call someone it to supply us with coffee and food, while we fought this monster. Day? Night ? Weekend? The only upside that it was written sql and running on sql server and not some unicorn level system. Sometimes I wonder what this particular Quant was smoking

    • @Pilkas_Vilkas
      @Pilkas_Vilkas 2 месяца назад +1

      Sounds like a daily full dababase dump to a single table for "ease of use" lol

    • @lolilollolilol7773
      @lolilollolilol7773 2 месяца назад +5

      Probably a guy who had absolutely zero idea how a database works.

  • @AScribblingTurtle
    @AScribblingTurtle 2 месяца назад +12

    JSON on a random Column? That is cute.
    The bane of my existence is a Table, that stores serialized PHP Arrays in one column and pure HTML in the Next. Compared to that, JSON ain't half bad. Organically grown codebases started by some dude in his bedroom over a decade ago are such a joy to work on.

  • @Matt23488
    @Matt23488 2 месяца назад +8

    I have 100% experienced a "Gilfoyle's Hard Drives" situation. When I became aware of this problem, I took it upon myself to fix it immediately. It took awhile, but eventually everything was put into TFS. And at this point many years later, most of that code has been completely rewritten as part of other efforts.

    • @xXx_Regulus_xXx
      @xXx_Regulus_xXx 23 дня назад

      the Gilfoyle at my last job had a network drive called "TheFrench"

  • @ph4seYT
    @ph4seYT 2 месяца назад +9

    Man... what does it say about me that I can't even land an interview when so many companies are accepting this quality of work?

    • @jordanhildebrandt3705
      @jordanhildebrandt3705 2 месяца назад +7

      It says that hiring is broken.

    • @xXx_Regulus_xXx
      @xXx_Regulus_xXx 23 дня назад

      ​@@jordanhildebrandt3705 the workaround seems to be embellishing your qualifications to match the embellished requirements.

  • @kalebbruwer
    @kalebbruwer 2 месяца назад +13

    I swear... I think SAP single-handedly raises the global average number of columns per table well into the triple digits

  • @MikkoRantalainen
    @MikkoRantalainen 2 месяца назад +12

    12:10 Writing single-task application was considered too hard so interns wrote and executed custom SQL queries against production database??? How? Why?

    • @phillipsusi1791
      @phillipsusi1791 2 месяца назад

      Haha, yea... and having 3 interns whose sole job is to keep doing these one off queries for who knows how long is easier than writing the one off application. WTF?

    • @ir0nsight280
      @ir0nsight280 Месяц назад

      easier to get an all-purpose intern who on paper can tackle any easy issues in the backlog, than convincing management to assign 4 weeks of work to build that application
      and then make the all-purpose intern only do sql issues

  • @moonasha
    @moonasha 2 месяца назад +9

    I think prime hit on something relevant. Imo code should be open sourced after a certain period of time, for the good of mankind. Especially defunct projects. We do it with public domain (or at least used to until it kept getting pushed back), we do it with patents. We should really do it with code

  • @EdmondDantèsDE
    @EdmondDantèsDE 2 месяца назад +27

    I don't see anything wrong with using JSON in a DB as long as it's not used to query rows. It's useful when you need flexibility.

    • @punishedbarca761
      @punishedbarca761 2 месяца назад +12

      It's okay on non indexed nonsense but eventually you'll have the one guy building pivots around json values and the whole world burns

    • @jimiscott
      @jimiscott 2 месяца назад +4

      We have some JSON in some tables where the schema changes and instead of adding new columns, the object gets stored in JSON. The rest of the database is properly relational. Sometimes it's just keeping all your data in a single db.

    • @noobling8313
      @noobling8313 2 месяца назад +1

      This. Example: We store the configurations for a tool in JSON - we need a few hundred configs - and the history of configuration edits (because it’s one of those ‘picky’ tools that it’s easy to fuck up the configurations of, but we also need to change them sometimes). The tool configs can be CRUDed using a simple browser UI, which shows the user feedback on their changes. The tool is a core part of our system in production and is constantly in use.
      When it comes to storing the data, I can think of ‘other ways to do it’ but not necessarily better ways to do it.
      Hard agree, however, on not needing to do any LIKE ‘%FOO%’ logic on it. I’ve been guilty of that in the past, and been responsible for tidying it up.

    • @xybersurfer
      @xybersurfer 2 месяца назад

      @@jimiscott is the user changing the schema?

    • @dave6012
      @dave6012 2 месяца назад

      @@noobling8313me who has used LIKE %foo% to query varchar columns many times 🫣

  • @ericmyrs
    @ericmyrs 2 месяца назад +23

    "No Mr President, we can't update G because Trygve is on vacation" - Some poor bureaucrat to Stortinget.

  • @rvijayteja
    @rvijayteja 2 месяца назад +32

    Why the heck is he pronouncing SQL like that 😭🙏

    • @MaxMustermann-on2gd
      @MaxMustermann-on2gd 2 месяца назад +1

      I thought i was the only one... Seriously, wtf

    • @LLlAMnYP
      @LLlAMnYP 2 месяца назад

      Because f sea-quell, that's why =) also kooh-beck-tell instead of cube-control.

    • @Alcaline-hu2vu
      @Alcaline-hu2vu Месяц назад +3

      It's a running joke

    • @misharatkevich9808
      @misharatkevich9808 Месяц назад +2

      To make us squeal, obviously.

    • @SmallSpoonBrigade
      @SmallSpoonBrigade 28 дней назад

      Considering how many people pronounce that incorrectly, squeal is far less stupid than the other ways that I hear people pronouncing that. For the record, it's pronounced SQL.

  • @user-lg4le8xr4s
    @user-lg4le8xr4s 2 месяца назад +17

    16:00 Schrödinger's work order

  • @rakly3473
    @rakly3473 2 месяца назад +5

    The way that sounds to me is like every dev would just scrape the db, then write their own little app with the data. This caused devs to keep adding columns to store the data of/for the app. Get a new task, write a new app to solve that task, add column. etc
    I've worked at a place where all employees had open communication with each other cross departments. So every one would just talk directly to a dev to add something just for them that no one else in the company uses. If that person left, the code was still there, but no one uses it any more. A new employee would then go through that process with their own requested solution.
    It's kinda fun, for the devs and other employees, but the codebase is such a mess. Actually it sort of - but not really -is like blockchain. There's a central point and every one builds their own thing on top of it. To put it simple, every one had their own custom built dashboard.

  • @ViciOuSKiddo
    @ViciOuSKiddo 2 месяца назад +43

    This whole "I'm concerned about perf" and then proceed to use GC languages is so true. People who write the slowest most dog shit code say stuff like that on a consistent basis. It's those people who think having less lines of code makes the code run faster.

    • @thomas.thomas
      @thomas.thomas 2 месяца назад +1

      The code in question:
      #import giantAssCodeBase
      doAll()
      // Very fast code because it only has 2 lines

    • @Internetzspacezshipz
      @Internetzspacezshipz 2 месяца назад +6

      lmfao for real. Return to C++, return to "oops, accessed a dangling pointer because some dumbass didn't use a smart pointer"... But also return to "yeah, this function takes an immeasurably small amount of time to execute".

    • @Justowner
      @Justowner 2 месяца назад +2

      If the goal is to get from the top of your source file to the bottom fast, then technically less lines is faster.

    • @andreilucasgoncalves1416
      @andreilucasgoncalves1416 2 месяца назад +1

      For web apps less lines really make the app load faster because of network, but will not save from deep React rerender

    • @lolilollolilol7773
      @lolilollolilol7773 2 месяца назад +3

      if you attack a table with over 1024 columns, the language you use to do it really doesn"t matter.

  • @panoukos41
    @panoukos41 2 месяца назад +5

    it's funny how we ask ourselves "How did this happen" but I am sure the place I first worked at and where I run from will likely be like this in 3-5 years time. The ideas the people there not only think but execute is madness.

  • @douro20
    @douro20 2 месяца назад +8

    Never heard anyone pronounce SQL as "squeal" before.

  • @PhrontDoor
    @PhrontDoor 2 месяца назад +5

    As a prof dba, I am torn...
    I wanna go down there and say "KNOCK THIS OFF"... but then I know I'd never be allowed to leave... I'd be "here is how you should do this" and "here is a basics on data normalization"...
    But at that point, I'd be forever fixing their mess.. and you KNOW it's not gonna be for decent pay!

  • @Tulla_unreal
    @Tulla_unreal 2 месяца назад +10

    We have json in our MS SQL DB, but not because we ran out of columns.
    Apparently they wanted to use a NoSqueal DB, but being a bank they would have had to have an expert with some kind of certification for it on staff, which they didn't, so into Squeal it went.

    • @henningerhenningstone691
      @henningerhenningstone691 2 месяца назад +6

      Yeah same here, except that it wasn't because certifications that we couldn't go nosql, but because of customer requirements.
      For some reason they insist on hooking our brand-new, modern application up to a 10 year old version of on-prem OracleDB.

    • @Tulla_unreal
      @Tulla_unreal 2 месяца назад

      @@henningerhenningstone691 Oh no that reminds me of that one company that had an interval (can't remember the exact number) where they would export SAP into an OracleDB for other Apps to consume.The documentation for that DB was a giant incomplete Excel sheet.
      It was impossible to connect some of the data because some IDs just weren't in the export.

    • @miled8649
      @miled8649 2 месяца назад +1

      @@henningerhenningstone691 Interesting, how it's going on so far?

    • @henningerhenningstone691
      @henningerhenningstone691 2 месяца назад

      @@miled8649 well, I can confidently say that Oracle is the worst DB in existence. Want to save an empty string to your string column, because that's what the user entered? Oh, let me make that null for ya. What, the column can't store nulls? Tough luck, now you have an error.
      And loads more nonsensical stories like this one. OracleDB is a meme in our team at this point.

  • @GuRuGeorge03
    @GuRuGeorge03 2 месяца назад +3

    Any codebase will have dark holes as I like to call them, unless they are made purely to educate someone. In any professional environment you will have 2 things happen:
    1. a seasoned developer who knows better fcks up because he is under pressure or lazy or any other human nature thing
    2. an junior developer who doesn't know better fcks up because he simply doesn't know better
    The likelyhood of those 2 scenarios happening in any amount of time is almost exclusively 100%. So yea, any professional code base includes reaaaaaaaallly bad code.

  • @JohnSmith-qy1wm
    @JohnSmith-qy1wm 2 месяца назад +3

    Yeah this actually happens in some corporations with older mainframe databases. These might indeed have thousands of columns (because of data type limits in the old database), and if you want to work with them in something like Postgres you have to split the rows between multiple tables and join them back with row ids.
    Table with one column and one row that generates auto-incrementing IDs? That's a sequence in Postgres lol

  • @tanner0397
    @tanner0397 2 месяца назад +9

    I'm a data engineer for a large company and hearing this crap makes me squirm. I've seen some shit. but this. this is extra painful.

    • @tanner0397
      @tanner0397 2 месяца назад +1

      y'all need star schema

    • @NostraDavid2
      @NostraDavid2 2 месяца назад

      ​@@tanner0397bitches don't know about my denormalized data warehouses.
      That includes me, because I've read Kimball's book and am as clueless as before I've started reading. 😅

  • @UltimatePerfection
    @UltimatePerfection 2 месяца назад +30

    If I ever see an SQL dump with huge "merchants" table and "merchants2", I will know what company it came from.

    • @ayporos
      @ayporos 2 месяца назад +6

      I'd bet 100 bucks that there's at least >100 company code bases out there in the world with a merchants and merchants2 table.

    • @UltimatePerfection
      @UltimatePerfection 2 месяца назад +6

      @@ayporos Well, then other stuff from the article will help narrow it down.

    • @phillipsusi1791
      @phillipsusi1791 2 месяца назад +1

      @@ayporos That is deeply frightening.

  • @MCasterAnd
    @MCasterAnd 2 месяца назад +3

    I know this story sounds insane, but as someone who is working with IT systems for a large insurance provider, these types of stories are far more common than you want to believe. I both laughed and cried at this, laughed because it's funny, cried because it reminds me of at least a handful of systems which I have touched over the years.

  • @varadrane7
    @varadrane7 2 месяца назад +3

    Where col like '%foo%' hit my nerve soo deep. I have deployed stored procedures that generate an application summary this way.

  • @animanaut
    @animanaut 2 месяца назад +5

    in the real world we call those rube goldberg machines. if you see a rube goldberg software/architecture equivalent at work its time to apply elsewhere

  • @richcole157
    @richcole157 2 месяца назад +28

    Is this a case of self selection. The only people who would accept a job working on that system are the ones that would perpetuate that sort of nonsense?

    • @killerkonnat
      @killerkonnat 2 месяца назад +8

      I would accept a good amount of money.

    • @MikeU128
      @MikeU128 2 месяца назад +22

      You typically don't get to see the actual code you will be working on as part of the job interview. I've had a few interviews where they come right out and say something like "Your first project will be to fix..." so at least you have some advance warning that you'll be dealing with broken code.

    • @jmbrjmbr2397
      @jmbrjmbr2397 2 месяца назад

      @@MikeU128 I think we should ask to check the codebase for few minutes before accepting offers. Why not? We aren't gonna memorize it, at least you could see if methods are thousand of lines or not

  • @dmitriyrasskazov8858
    @dmitriyrasskazov8858 2 месяца назад +3

    Oh boy, and i thought that my process where i have to go to accounting floor, ask a lady if its ok to do X and come back and press a button once a month was a giant crutch...

  • @satibel
    @satibel 2 месяца назад +2

    on "the application for a for a single job", I did a bunch of custom "data massaging" apps that were basically convert some excel sheet, sanity check everything and add some data so instead of doing some half a day data entry job it was a 15 minute job at most (basically any line that wasn't sane was manually corrected and then stored as the default for matching cells, so they would just have to check it was ok instead of retyping everything).
    stuff like putting email adresses as delivery adresses and things like that were a common occurence
    you should've seen the function that checked addresses, basically a bunch of exceptions, because saint louis could also be "st louis", "st. louis", "louis, st" and a whole lot of other variations, including using the unicode ˢᵗ.

  • @georgebeierberkeley
    @georgebeierberkeley 2 месяца назад +5

    There’s also a size limit. If each field is a blob, you’ll run out of space long before 1024 columns.

    • @JoeEnos
      @JoeEnos 2 месяца назад +1

      Yep, 8KB can fill up fast with a handful of nvarchar(200) columns. That’s going to be much more likely than having thousands of smallint columns.

  • @Draghtnim
    @Draghtnim 2 месяца назад +4

    8:26 "This is a story of a man named Stanley"

  • @Kane0123
    @Kane0123 2 месяца назад +5

    0:48 950 columns? That’s child’s play

  • @Alcaline-hu2vu
    @Alcaline-hu2vu Месяц назад +1

    That dev really knew how to secure his job by becoming the only person in the planet that could possibly understand his codebase, a truly mad individual

  • @ReedoTV
    @ReedoTV 2 месяца назад +22

    All I remember about databases is the phrase "They key, the whole key, and nothing but the key"

    • @v0id_d3m0n
      @v0id_d3m0n 2 месяца назад

      Ha I've never heard that phrase in relation to databases. It's good!

    • @ayporos
      @ayporos 2 месяца назад +1

      ​@@v0id_d3m0n You haven't? It's literally the holy mantra of Database Normalization. :)

    • @eltreum1
      @eltreum1 2 месяца назад

      @@v0id_d3m0n He is quoting the 3rd normal form rule or sometimes called BCNF Boyce-Codd Normal Form. There are 5 normalization design principles to prevent you from making or breaking a database. ruclips.net/video/GFQaEYEc8_8/видео.html

  • @NFSHeld
    @NFSHeld Месяц назад +1

    I have recently started a new job and joined a team to improve a piece of software that was a 1-man rewrite of an old piece of software. You know how they say "perfect is the enemy of good"? Well, that's true, but on the other end of the spectrum lies "just make it work for now", and that is by far the most common requirement. I found code that was raising events in the 6th composition shell layer, bubbling them up to a top-level god-object, that was passing it back down again back though methods into the object that generated the event in the first place.

  • @adventureacademy5958
    @adventureacademy5958 2 месяца назад +3

    This is a Dr. Strangelove story. How I learned to stop worrying and love the code base.

  • @DerekSeymour-f3b
    @DerekSeymour-f3b Месяц назад +1

    That is stone-cold hilarious - the watering hole is polluted. The funny thing is - if you work on legacy long enough - you'll find out there is 2 watering holes (one at the back - where nobody wants to go) and the one out front - which is just as bad.

  • @GrizikYugno-ku2zs
    @GrizikYugno-ku2zs 2 месяца назад +13

    Hey, Primeagen, I'm not known for anything, but I'm an experienced engineer who's been self taught and solo for 8 years, and I have a program that's like 100% reflective programming. It's a botnet that plays games. Everything from the introduction of an new IP to the wifi network, grabbing the bots profile, the way the 8 levels of decision making function, to the way screen data is processed in terms of both what is on it and what to do areceive. It's all "reflection" which is a word I just learned from this video, funny enough.
    I don't know any other way to program. I tried the different styles a ling time ago, and "went caveman" and just started doing things however I felt. Reflection is something I cavemanned together, apparently.
    I'd be happy to show you my "beautiful black hole volcano disaster" code as I think you'd find it amusing and I'd learn a lot from the roasting I'd recieve.

    • @NostraDavid2
      @NostraDavid2 2 месяца назад

      This sounds amazing - I hope @theprimeagen will take interest.

    • @77DMN
      @77DMN 2 месяца назад

      Do it

    • @Internetzspacezshipz
      @Internetzspacezshipz 2 месяца назад

      It's so funny, I ended up trying to reinvent reflection in my earlier years of programming as well for a project I was working on... I feel like it's a right of passage for any programmer to do when working in languages with no built-in reflection...

    • @markvandermeulen1612
      @markvandermeulen1612 2 месяца назад

      I think I used to code like this when I was in high school and self taught. I think I was a much better programmer back then too

    • @gamingczsk8136
      @gamingczsk8136 2 месяца назад

      Do it

  • @thedreadedgman
    @thedreadedgman 2 месяца назад +1

    I feel this... at one company, we had a 3-part table with equipment_reg, equipment_reg2, and equipment_reg3... since it was migrated from a legacy schema from a system with hard limit of 255 columns per table... and the IDs one one table were stored in a field in another table, even though the current database system (sql server) has auto-increment, it wasn't used for that table, you had to start a transaction, increment the row in the constants table, then use that ID for the new row in the other table then close the transaction... suffice to say it was slow.

  • @prschorn
    @prschorn 2 месяца назад +14

    I work with a "gilfoyle" like this. Dude reject git because he doesn't trust cloud and stores everything on his own machine, now imagine sharing a code base with this man.

    • @conman7644
      @conman7644 2 месяца назад +4

      Yeah, I have worked on a place where you got the codebase in a zip-file . Which got passed around...

    • @NapiRockAndRoll
      @NapiRockAndRoll 2 месяца назад +3

      The company should fire him. Causing more problems than he could solve.

    • @elementiro
      @elementiro 2 месяца назад

      They should be happy that he at least stored it SOMEWHERE, not just delete the code as soon as the client received the solution

    • @Yay295
      @Yay295 2 месяца назад +8

      but Git is distributed, so everything is still stored on your machine...

    • @MatthijsvanDuin
      @MatthijsvanDuin 2 месяца назад +6

      If you don't trust clouds, don't put your git repo on a cloud, that's not a reason to not use git. I often enough use git locally to have version tracking on a project even if it doesn't live anywhere other than my own hd, and you can also push/pull between different machines locally via ssh.

  • @JosiahPlett
    @JosiahPlett Месяц назад

    I love how you always highlight sentences from the second-last letter to the second letter. It's just pleasant

  • @adamschneider868
    @adamschneider868 2 месяца назад +3

    I feel called out by the fuzzy operator :(
    J.K. I only use for searching logs or something like that.
    If you need 1500 Columns, you really need 100 tables.

    • @badpussycat
      @badpussycat 2 месяца назад

      you might wanna use full-text indexes

  • @pi_xi
    @pi_xi Месяц назад +1

    This reminds me of a bug in a very old custom ABAP application which generates a batch input on the SAP transaction F-02. The application had over 50'000 lines of code, was extremely important for the company, but stopped working after migration to SAP S4/HANA. Because the whole code was completely undocumented and it contained very deep IF statements (about 20 levels deep), we did not rewrite it. What we did is porting the old SAP R/3 standard application to S/4HANA, so that it exactly behaved like the old F-02. We had to duplicate lots of includes, function modules and customizing tables, but at the end, it worked.

  • @funkdefied1
    @funkdefied1 2 месяца назад +13

    3:28 I wish my company’s DB stored unstructured data in JSON. Rather, business critical data gets stored in either XML or with home-spun array serialization. Sometimes the arrays are comma separated, sometimes double-colon separated, sometimes separated by some random non-visible Unicode value.

    • @amzker
      @amzker 2 месяца назад +1

      Dude i can feel your pain😂😂😂, stored in xml? Shit

    • @puilp0502
      @puilp0502 2 месяца назад

      > some random non-visible unicode characters
      Is that you, ZWSP?

    • @phillipsusi1791
      @phillipsusi1791 2 месяца назад

      @@puilp0502 How about Zero Width Joiner? Man emoji + rice emoji = farmer emoji! Yay for 3 unicode code points that is 15 bytes in UTF-8 that means a single emoji that is two characters wide!

  • @mllhild
    @mllhild 2 месяца назад +2

    Single person use applications is what I did for the last 4 years at my job. They are all only on a hidden folder with all other source code I made.

  • @__init__
    @__init__ 2 месяца назад +6

    Man I think I’ve used b2b websites written like this

  • @Brutik5
    @Brutik5 Месяц назад +1

    I am not a programmer. But I heard a phrase.
    "Real programming starts when you run out of memory."
    So I guess. "Real database management starts, when you run out columns."

  • @kevqn
    @kevqn 2 месяца назад +6

    This is the best video I have ever seen.

  • @georgegonzalez2476
    @georgegonzalez2476 2 месяца назад +1

    Yeah, I've seen some horrific database designs. At one place we were told to add a feature, by next Thursday. However the database kings required that if you needed a new column, you had to submit a formal document. The database committee would meet once a month, and usually reject a proposal once or twice. So we were stuck. Fortunately I saw that the "fax number" field was always empty. So we packed in two integers into the fax number field. Nobody noticed.
    At another place, all SELECTs were really slow, as there were no keys, every select had to do a string search on every row. Every time.
    It gets worse. Another place was using an offbeat SQL where the basic insert/delete features used a non-standard way. Something like a SELECT with an empty something was actually a DELETE. And the SQL server was like seven years past end of support. Yikes. When I suggested factoring the code a bit to speed up the conversion, my key card didn't work the next day!

  • @_GhostMiner
    @_GhostMiner 2 месяца назад +3

    What kind of monster would pronounce "SQL" as "squeel"?

    • @SminkyBazzA
      @SminkyBazzA 2 месяца назад

      I'm assuming it's some kind of channel in-joke, but either way I'm never coming back.

  • @kevindurillon3362
    @kevindurillon3362 2 месяца назад +1

    It was at this moment he knew, he was fucked up... and decide to release the infos to the public for posterity. A great man, a savior, for all coders.

  • @griffitaj
    @griffitaj 2 месяца назад +9

    Fuzzy searching JSON in a SQL database is my life

  • @tomasoon
    @tomasoon 2 месяца назад +1

    As a Data Engineer I can assure you that this kind of things are happened more often than you thought, and Nope, it doesn't happen in cheap, little companies, most of the biggest companies have flaws like this.

  • @bailey125
    @bailey125 2 месяца назад +3

    Who tf calls it "squeal server"??

  • @blenm3
    @blenm3 Месяц назад +1

    I uh.... still use Team Foundation Server. We've been off-and-on working on migrating to git for over a year now. The code was migrated to TFS from SourceSafe, and a significant portion of the codebase predated that. The code history is such a mess that any TFS->Git conversion tools I've tried don't know what to make of it; and yes, the code is unfathomably cursed in many different ways.

  • @easyBob100
    @easyBob100 2 месяца назад +4

    How many unique bits of info do they have for each merchant? I just don't comprehend how you'd continue to add columns like that....

    • @Intense011
      @Intense011 2 месяца назад

      I wasn't 100% paying attention, didn't the article say it was related to a search feature? My guess was that they had a table where each row was a "merchant", and added a new column for every "keyword" they wanted to be associated with the merchant. A more sane way to do this would be to have a separate table where each row has a merchant_id and single keyword column, and add a new row for every merchant_id/keyword pair. Then find all keywords for a merchant by joining on merchant_id. Now your only limit is row count not columns.

    • @easyBob100
      @easyBob100 2 месяца назад

      @@Intense011 I didn't hear that it was related to search, maybe I missed it too. If it's that keyword thing, I agree with you, that should be two different tables, one for keywords, and the other to hold keyword_ids and merchant_ids. A join is possible but a sub query is fine these days (in mysql at least)

  • @deadspeedv
    @deadspeedv 2 месяца назад +1

    It is funny because all the way through university you are taught 2nd, 3rd, BCNF normal forms to reduce data redundancy and save space. However when you work in organisations with big data they often have these "Single Source of Truth" tables with countless columns that could easily be broken up into multiple tables, however they don't because it is significantly easier to write various SQL when most stuff is in 1 table rather than 1000.

  • @johnrcornell
    @johnrcornell 2 месяца назад +6

    Weight Watchers (the frozen dinners) runs their whole company on an Excel file

  • @joeylantis22
    @joeylantis22 Месяц назад

    It's awesome how much you interact with your chat. Most of the time I don't even understand the point of live steams/chat when the streamer doesn't even touch it.

  • @pidojaspdpaidipashdisao572
    @pidojaspdpaidipashdisao572 2 месяца назад +15

    I have never experienced such pain in my life. Every time you select the text, you always miss the first and last letters. Please stop doing this I do not feel well seeing this.

    • @EnlightenedSavage
      @EnlightenedSavage 2 месяца назад +6

      Lol, I vote for him to miss the first 2 and last 2 now....😂

    • @KingSvenDeluxe
      @KingSvenDeluxe 2 месяца назад +7

      It pleases me greatly when he does this, I would not like it if he stopped.

    • @mort44444
      @mort44444 2 месяца назад

      He doesn’t miss them, he avoids them. I like it

  • @mawnkey
    @mawnkey 2 месяца назад +2

    First network admin job I ever had we had an Access database that indexed all the CAD drawings our technicians had to work on. Every technician had a VBA application on their system that would read and update status of drawings in that shared DB on the network. The database would be corrupted on an almost daily basis, and I eventually decided to look at the code to figure out why. When I finally dug in to the code I found that anywhere an exception could be thrown when trying to lock the DB for opening was the following line: *On Error Resume Next*
    Handling exceptions is for amateurs. Real men just write to the DB even if they got an exception.

  • @SuperRedstoneman
    @SuperRedstoneman Месяц назад +1

    The people in chat asking "whats reflexion" are so cute and unaware of the horrors possible with it

  • @T33K3SS3LCH3N
    @T33K3SS3LCH3N 2 месяца назад +2

    3:20 literally my current job, only that it isn't even JSON. All business data is stored in strings string separated by characters like $.
    So when you have to query it, well... you just don't. You ask your queries against another data access layer that will look that data up from files in a proprietary format... so sometimes you first have to export the database into files to be able to look up anything 😂

  • @ItZxDraW
    @ItZxDraW 2 месяца назад +1

    Tutorial hell couldn't catch me, but prime hell did. Can't stop watching your videos bro, you are as entertaining as educational. Love from germany

  • @KingWesleyIV
    @KingWesleyIV Месяц назад +1

    I have literally never heard a single person in the industry pronounce "SQL" the same way. I spell it out "S-Q-L, my boss says "Sequil", you say "Squeal", and my coworker says "Scue"(?).

  • @MunyuShizumi
    @MunyuShizumi 2 месяца назад +1

    This was the most cathartic article I've ever seen. I've gone through all 5 stages of grief while reading it. By the end, I was spiritually reborn.

  • @Thoringer
    @Thoringer Месяц назад

    Did a dashboard with a single SQL query with - if I count correctly - 26 joins. about 1-15 of them are CTEs with their own set of joins I don't even count here. Works flawlessly. Even presented it at a conference.
    The reason: It's a DB for student advisors at a large university. It pulls from student records, employment records, advising tables, grade tables, enrollment tables, student attribute tables, email databases, and the list goes on. The reason why it was such a game changer is because you now have caseloads and student attributes and even checking for who is still assigned to an advisor that left or the student changed their major and now, you can see they need to be reassigned. Also checks on academic probation and dismissal cases so we can do targeted outreach...
    Things that took a supervisor the better part of a day now takes them 5 minutes. The key is caching every morning.

  • @hobbbiz
    @hobbbiz Месяц назад

    I'm impressed and also absolutely horrified as to how they got to reach the max column count on a MSSQL Server. At my company our record was 7 tables, but only with around 400 columns.
    MSSQL has a max table length of 8KB, so that would mean each of their columns had a average length of 8 god damn bites. Thanks for the video, I just realized I still have a long way to go and a lot to learn from this company

  • @MrRecorder1
    @MrRecorder1 2 месяца назад +1

    Legend has it that Gilfoyle's harddrive RAID is still kept alive with frog bladder oil and a ritual sacrifice on Friday afternoons in Pete's shack behind the lake.

  • @-Jakob-
    @-Jakob- 2 месяца назад +2

    I remember when Oracle didn't support auto increment, you had to do it by trigger - that triggered me back then.

  • @Rubyboat
    @Rubyboat 2 месяца назад +1

    14:04 this spoke to me on a spiritual level. The legacy code base I'm working on right now, uses date picker, C#, jquery and iis express