thedirtycoder's profile picture. Founder, Object Dementor

Uncle Bob's Nibling

@thedirtycoder

Founder, Object Dementor

Pinned

I finally figured out how to get those pesky semicolons and curly braces out of my Java code

thedirtycoder's tweet image. I finally figured out how to get those pesky semicolons and curly braces out of my Java code

My PR to @chesscom where it randomly gives you 400 puzzle points then takes them away was accepted

thedirtycoder's tweet image. My PR to @chesscom where it randomly gives you 400 puzzle points then takes them away was accepted

OH: "But if nobody is in a hurry, I’d love to toss it in the backlog and ignore it forever"


Copilot really does know what I was going to write

thedirtycoder's tweet image. Copilot really does know what I was going to write

Linter said not to nest ternaries so I mixed in if statements: const onHideButton = type => { if (hideButton === null) { return sudo ? onParentHideButton(type) : !sudo ? true : undefined } else { return hideButton ? undefined : onParentHideButton(type) }


I write a script called "d" to deploy to prod, then realized I could golf the one character name down to zero! I have since mapped the F3 key to deploy to production. Very satisfying code golfing, plus it cuts our time to launch deployments by 50%


Someone copied an existing method of mine and removed the curly braces to reduce the line count

The Dutch government was forced to release the source code of their DigiD digital authentication iOS app. It is written in C#. github.com/MinBZK/woo-bes…

JeroenFrijters's tweet image. The Dutch government was forced to release the source code of their DigiD digital authentication iOS app. It is written in C#.
github.com/MinBZK/woo-bes…


I'm getting better at software reuse. I had an old concurrent program whose purpose I forgot, so I repurposed it as a random string function


Why doesn't VS Code show me exactly how many errors I have? Oh wait

thedirtycoder's tweet image. Why doesn't VS Code show me exactly how many errors I have? Oh wait

Enjoying these React Hooks. Been working on my usePython hook for the last three years. About 60% done so it should be ready in late 2023


Tired: __ to "hide" props in Python Wired: class Thing: def __init__(self, desc): Thing.__str__ = lambda s: desc t = Thing("works") print(t) # => yes, prints "works"


They took my suggestion

The Dutch government was forced to release the source code of their DigiD digital authentication iOS app. It is written in C#. github.com/MinBZK/woo-bes…

JeroenFrijters's tweet image. The Dutch government was forced to release the source code of their DigiD digital authentication iOS app. It is written in C#.
github.com/MinBZK/woo-bes…


Fortunately the JavaScript floor operator ~~ is idempotent so you can repeat it often to make those important type conversions easy to find at a glance console.log(~~~~~~~~~~~~~~~~(100/7))


Just getting to my bug fix list from 2013


Before you look at my code, it is both clean and not clean at the same time Just kidding, you don't need to look


Writing `def draw() ...` then `g.draw = draw` felt redundant and wasted a line of code so I fixed it g.draw = lambda: \ g.background("skyblue") and \ g.fill("yellow") and \ g.ellipse(g.width, 0, g.height / 2)


JS has null for positively no data, but undefined can mean either i-dont-know-maybe OR i-know-but-none-of-your-business. In my code I keep undefined for the former but for the latter I use const undephined = {} It's perfect bc with knowledge it isn't nullish


In my latest Lua game, I store player info in a table only at Fibonacci indices t = {[0]=pA, [1]=pB, [2]=pC, [3]=pD, [5]=pE, [8]=pF, [13]=pG} so I have lots of extra storage for temp variables and game context (which grows exponentially w/ the number of players so I got this)


This account does not follow anyone
Loading...

Something went wrong.


Something went wrong.