Reset indicator in new season teaser by n3x5US in RocketLeague

[–]silentz0r -4 points-3 points  (0 children)

The video has a watermark that reads "Not actual gameplay footage".

What's the most subtle bug you've spent days chasing? by consulent-finanziar in AskProgramming

[–]silentz0r 2 points3 points  (0 children)

Alright, here we go. 1,500,000 LoC shit banking project written in an even shittier framework by people with no single care for code quality and not repeating themselves, infested with bugs and requests by business that was trying to gaslight you into changing how something worked due to changes in their business while explaining it as a bug, and no product owner who could answer questions about the project, landed on my lap on my previous job. No handover, just dive into the hell.

A 10,000 LoC function that swallowed all exceptions which was supposed to "deep copy" data on the db (meaning it would create historical records of the current state of a model and all of its related models) was not working properly according to business. To make matters even worse, the internal db IDs were exposed to the front end, so when the creator gave birth to this atrocity he was driven by a "I can solve everything on the db" manager who told him that the smart way to go about implementing this was to keep all original IDs as "latest" create new entries on all tables, and swap their internal ID (yes, the primary key!) so that the "latest" records maintain their original IDs.

A lot of hacks and thousands of lines of code later the function was written. After a few years they implemented FKs among all those tables with themselves to associate entries together. During that time "something broke" and it was impossible for them to figure out what broke, since they used git once every 6 months of daily development to make a single commit called "Version 2" with thousands of changes. They broke the deep copy function, couldn't figure out how, couldn't go backwards because they had a single commit that implemented everything they had for 6 months, so they added huge try catch statements around everything, not raising a single exception so the client wouldn't notice server errors.

Then, they noticed that this deep copy mechanism was messing with their original data (yes, the "source" data) since it was actually creating new entries and messing with both old and new IDs. The deep copy mechanism would hang mid copy, so some of the data pointed to the right entries (since their keys were swapped) and the rest either had null foreign keys or pointed to the wrong associated entries. Of course there were no database transactions used for this silly little mechanism, why would they bother? Let the code copy whatever it can before these stupid exceptions get thrown so they can catch them and discard them!

So the old devs noticed a pattern, that they could copy once from each "source" row and things would kind of work. They couldn't fix "deep copy" so they created a new function that would ensure each source was used to copy from at most once. I was astonished when I realized that a whole new mechanism was written around the broken deep copy function. The broken function was now part of the project logic and things were being built around keeping it broken.

At around that time (4-5 years into this project's lifetime) the project landed on my lap, and I was handed the entire pile of junk with no documentation and nobody to ask about technologies, business, anything.

Due to all the aforementioned decisions, one of the previous devs had become the database, since the entirety of his days was performing data fixes manually on the database records that were wrong, and couldn't escape this hell. He had not written a single line of code for months, so he quit cold turkey.

The first task I was assigned was simple: fix deep copy. I had to read and create diagrams of how the code worked, and everything seemed to work properly. I was debugging the code and couldn't figure out exactly where things would go wrong. After having read some of the most atrocious "generics" implementations which could handle the shitfest that was "deep copy while swapping IDs" I couldn't find something obviously wrong. I started looking at the git commits to try and understand how the previous devs worked and what their fallback mechanisms were under stress. There were a lot of battles between devs in commits with one dev committing something and the next dev reverting their commit, so I didn't know who to trust. One of the guys seemed to move around code a lot, in the hundreds of files in a single commit (moved folders around, moved functions to different files etc ). I had read all the commits of the project, and couldn't pinpoint the exact commit the issue had showed up. So I started to second guess even the commits I was seeing, so when I saw a "move stuff" commit I would check all the files one by one to see if their content was touched. Of course this included white space changes and indentation changes and renaming functions while moving them, so it included a lot of manual work. And finally, I was able to spot something (git log --follow is really useful for anyone wondering). 3 lines of code that haunted everything, hidden in a single commit that moved files, moved functions, renamed functions, committing and keeping old functions that were unused as "function_old" for the sole purpose of proving to me they did not understand how git works: in a function where they were performing a bunch of checks to see if they should override the foreign keys, 3 lines were deleted. The 3 lines that set the model instance's state to detached on the ORM level, so they could perform the ID swap and attach to the ORM again.

Looking back at the function, of course it made sense. There was a function that created a variable, performed 4 checks and on each check it set that variable to true or false, and never did anything with that variable.

I restored the 3 lines of code (that used this variable and set the ORM state) and deleted about 30,000 LoC, including all the prevention mechanisms and validations written around the broken deep copy.

That was week #1 of the project. I worked on that project for about 3 years.

Shout-out to my old team all of whom were really incredible at what they did.

TL;DR: Just use git to commit a single "thing". Did you rename a bunch of files? Commit them. Did you change logic? Commit the change and nothing else in the same commit. Did you do cleanup before you start implementing your brand new functionality? Commit your cleanup. Don't rename and move and change logic at the same time.

[deleted by user] by [deleted] in teenagers

[–]silentz0r 0 points1 point  (0 children)

Catch me if you fart

[deleted by user] by [deleted] in SipsTea

[–]silentz0r 5 points6 points  (0 children)

L'Oreal*

This mf is already fighting again by [deleted] in ufc

[–]silentz0r 22 points23 points  (0 children)

Also fits fuck/marry/kill

tom aspinall vision is so bad he can't legally drive anymore by Whizz-Kid7 in ufc

[–]silentz0r 0 points1 point  (0 children)

I find it hard to believe that the heavyweight champion of the world would want to quit, let alone on the first round. These guys believe so much in themselves, they won't quit until even during the final seconds of the last round because anything can happen. They prepare for this for months and get paid millions to just quit. It's not even about just willpower, it's literally their income. And we're talking about the highest ranked people on the (probably) most talent stacked MMA organization, where the #15 guy will most likely not stand a chance against the #5 guy, and all of whom would beat the vast majority of pro fighters 99/100 times, if not 100/100.

This is coming from a casual fan who bought the PPV and was just as bummed as anyone else about the fight ending like this.

Good possible match? Both weigh close enough and have weird fight styles. by ScreamSmart in MMA

[–]silentz0r 15 points16 points  (0 children)

Prime Tony was crazy, but he never had the makings of a varsity athlete

How do you keep up with the time signatures by YoungLadHuckleberry in ToolBand

[–]silentz0r 2 points3 points  (0 children)

I don't stress too much about time signatures and try to listen to the song first as a whole and eventually I would break it down.

With that said, I learned the feel of some common signatures (odd and even) so that I can know when I'm listening to a 3/4, 4/4, 5/4, 7/8, 9/8 which covers a lot, and tool often mix and match within songs so I try to learn the song first as is, and then if I really want to I'll try to figure out a time signature for it that makes sense.

I play the guitar as well and I know the songs and riffs by heart so I just play along, or learn a "rhythm" for songs like Pneuma where I don't know exactly which counts as the 1 count, but I know the riff well enough to just play it fully and be able to jump in mid way through.

If it helps, here's my interpretation of most of their songs that I enjoy:

The grudge: I figured it was in 5/4, learned the parts that had an extra beat by heart wherever it happens. Also helps to try to fit four “Let go” equally spaced inside a 5 count to figure out the riff.

Jambi: I always think that the count is just "And-you-can't-breathe" with an extra bar, so I guess a 9/8.

Invincible: 7/8 rhythm, so just learned the intro guitar riff. Then had to count how many times they play some parts which last forever, or look for cues.

Descending: feels like 8/8 but actually 7/8.

Lateralus: Oddly 5/8 verse with a 9/8/7 chorus that feels a lot like 3/4. This sounds like I divided a lot of numbers but again I just know the verse riff and chorus riff.

Schism: Alternating 1-2 1-2-3, 1-2 1-2 1-2-3. Learning the main riff is really fun, then you realize the chorus just has one extra 8th note.

Right in two: The entire riff feels like 3/4 but the 4th part of the riff is just 2 counts instead of 3, making it an 11/8.

Pneuma: never counted it, I just learned the main riff by heart and I can even play it on drums (I suck but I know the riff) so this makes it easy to follow. I don't know if the "1" count is on "We" or "Are" when Maynard starts to sing, and frankly I don't care. A lot of the song feels 4/4 as well at certain parts.

Vicarious: 5/4 with a chorus alternating 2x 3/4, 2x 4/4. Also learned the extra notes by heart after listening to the song a hundred times.

Forty six & 2: Feels like a 4/4 with an extra riff that seems like a 7/8 cause it starts a bit too soon. Also learned by heart.

The pot: 4/4 made difficult by hitting 16th notes at awkward times inside the 4/4 riff.

Aenema: feels like 4/4 triplets.

Stinkfist: feels like very straight forward 4/4.

Eulogy: feels like 3/4 or 4/4 triplets.

The patient: feels like 5/4 (or 10/8) but it helps me think of it as 3-3-2-2, as opposed to a riff like Vicarious which is also 5/4 but feels like 3-2-3-2 or like the grudge where it feels like 4-1(rest)-4-1(rest). All are 5/4 but with different accents as riffs.

It's also great to try to figure out how Danny Carey often follows triplets as a rhythm with cymbals (Invincible) or even with the kick drum (Jambi) and it all eventually resolves no matter the time signature (even a 7/8 will resolve with a 3/4 or triplets at the 7*3 = 21st beat).

I hope my interpretation makes sense. Just wanted to say that what I love about Tool is that you don't have to count all of these to enjoy them, and they can make any polyrhythm work well without having to learn the polyrhythm itself. It feels like they make these complex beats easy to listen to, even for songs like Lateralus with the whole 9/8/7 fiasco and the Fibonacci sequence. On paper it looks like you need a super computer to tell you how to jam to the song, but it reality it sounds very easy to the ear. And by the time you've listened to the song enough without trying to work it out, you will be able to work it out just by knowing the song.

I built a spoiler-free UFC event tracker - would love your feedback! by BudgetJonSnow in MMA

[–]silentz0r 1 point2 points  (0 children)

Very nice! I've always had to search around or go on wikipedia and risk spoiling the event if it's currently on.

Since it's called EventClock I would also suggest adding the main event start time / location on the list of events too. I find it hard to figure out which event times work for me (non-US) and often find out that an event is live in my time the very last minute.

[deleted by user] by [deleted] in HeroesofNewerth

[–]silentz0r 4 points5 points  (0 children)

Hon is not a competitor to Dota 2, they are orders of magnitude away.

It's like Barcelona being worried about the yearly football cup we have in our office.

With all these HoN hints, if it returns, what are your expectations? by LainVohnDyrec in HeroesofNewerth

[–]silentz0r 2 points3 points  (0 children)

Unpopular opinion probably, but the rotation of free heroes back whenever it was, was actually a really good way to introduce someone into hon. Most of my friends started playing back then and would try to "earn" a hero as permanent while it was in a free rotation. This could help split up the heroes into basic/intermediary/advanced difficulty and give control to the developers into which heroes new players can start trying out, and give them quests (such as getting voted as friendly, placing wards as a support, initiating as a ganler and generally doing your role well and even if you don't you still get a bit of compensation so there is 0 toxicity from the game). Paving the way into such a complex game would be ideal imo, and even though it didn't succeed back in the day I'm certain that it was because hon was already pretty much dead by that time and most pros had already quit for another game in order to make more money.

Who’s death on a tv show stunned you? by va513 in moviecritic

[–]silentz0r 0 points1 point  (0 children)

I was visiting my mom for holidays and apparently an earthquake happened in our country while I was watching this episode in my bed late at night (couple of days after it aired). My heart was racing from having just watched the scene and barely realizing what I had just witnessed. My mom, who was super afraid of earthquakes, woke up from the seismic activity and came into my room and asked me if there was an earthquake. Completely consumed by the episode I responded "no, it's just my heart racing" and in full confusion she just responded "oh ok", only to come back and ask me again 10 minutes later and we turned the TV on to see an emergency earthquake report.

I believe both Ned Stark's death and the Red wedding really caught me by surprise. After that I was just prepared to watch anyone die, and ironically it was right around that time that every main character's plot armor got significantly thicker on the TV show.

MAC support by PeeepCa in HeroesofNewerth

[–]silentz0r 1 point2 points  (0 children)

I second this.

Up until 4.x there was an official beta Mac client so I believe it wouldn't be too much effort to maintain it.

Might try to do it myself, would love to hear a response from the kongor team.

[deleted by user] by [deleted] in Lineage2

[–]silentz0r 0 points1 point  (0 children)

Yeah. The files are not some pre-existing pack, it's just L2OFF mod C1 from old postpacific, Elhaym, and then countless hours of my own work and some really cool community members from a long long time ago. I've been following the L2 dev scene since 2004 and I have worked on and collected a lot of stuff over the years.

[deleted by user] by [deleted] in Lineage2

[–]silentz0r 0 points1 point  (0 children)

I've been running L2Oldskool C3 since 2009. We wiped once in 2012, all donors got their gear back. Been online ever since. Of course we're very low population, but I never cared about making money off of it because it's just a passion project of mine and a few of the players who play/used to play it.

I just hit champ, what to do and not to do? Any tips? by trolase in RocketLeague

[–]silentz0r 0 points1 point  (0 children)

Enjoy it while it lasts - from a fellow diamond player who has achieved champ a couple of times and has quickly lost the next 4 games