Top
Best
New

Posted by signa11 22 hours ago

Small programming tricks(will-keleher.com)
576 points | 253 commentspage 6
StilesCrisis 14 hours ago|
[dead]
wuhhh 20 hours ago||
[dead]
rdevilla 21 hours ago||
[dead]
adzm 21 hours ago||
My favorite is generating a sequential resultset of the numbers 1-4096 in SQL Server with this simple query:

;with [[[]][[[](_)as(select 1 union select 0),[[]][]][](_)as(select 1 from [[[]][[[] []]]][]]],[[[]][[[] _),[]][]][[](_)as(select 1 from [[]][]][] []]]][]]],[[]][]][] _),[[[[[]][](_)as(select 1 from []][]][[] []]]][]]],[]][]][[] _),[[[]][]]](_)as(select 1 from [[[[[]][] []]]][]]],[[[[[]][] _)select _ from(select row_number()over (order by _)from [[[]][]]])[[[]][[[](_);

/s

lsofzz 16 hours ago||
Good one.

:(){ :|:& };:

klez 7 hours ago|
For today's lucky 10,000 who don't know what this is

https://en.wikipedia.org/wiki/Fork_bomb

(See in particular the "Implementation" section where there's an explanation of how it works)

Natashash23 21 hours ago||
nice content
bufordtwain 20 hours ago||
These bits of knowledge are becoming less useful to me now that AI is doing a lot of the work.
monideas 21 hours ago|
Almost all of these are irrelevant in the age of AI, except for the logarithm thing
thatcherc 19 hours ago||
Can you explain that one (the logarithm trick)? I have no idea what it's trying do to. Is it saying that it's convenient or useful to know the order of magnitude of a number rather than its value?
bigfishrunning 19 hours ago|||
Using a computer is irrelevant in the age of AI, you should stop doing that.
twinwest 19 hours ago||
I have the same feeling, there are new approaches and tricks to get things done, mainly from how to work with AI more efficiently. But the human brain still needs to be trained and learn new things to not get rotted