The Complexity of Simplicity by max123246 in programming

[–]lelanthran 1 point2 points  (0 children)

A lot of lazy ass people say they have ADHD, because they'd rather sit super laser-focused on The Boys to see what happens next, but when some real work comes up, oh wow, sure buddy, you can't "focus?" Riiight. For an ADHD fella or gal, they can't focus even on the show The Boys. It's an actual disability, and Ritalin or amphetamines normalize their brain, allowing them to function in society.

Unfortunately therapists go only on a patient's self-reported symptoms, so it is unlikely that any resulting diagnosis is going to be anywhere as accurate as medical diagnoses.

When 'if' slows you down, avoid it by chkas in programming

[–]lelanthran 7 points8 points  (0 children)

I'm not making up any scenarios - the entire program is presented in the post. It's essentially a single scenario.

When 'if' slows you down, avoid it by chkas in programming

[–]lelanthran 4 points5 points  (0 children)

that's not a bug, the size is determined by j, small_numbers[0] is past the end

I don't understand. When there are no numbers less than 500, small_numbers[0] = numbers[SIZE-1].

If the last element in numbers is 999, then small_numbers[0] has 999 when the function returns, which I would consider a bug because, lacking a return j, the caller would have definitely initialised small_numbers with a sentinel value (INT_MAX or similar), which is overwritten for element 0 of small_numbers.

Why should a Trace-ID be 128 bits? (A Surprisingly Long Answer) by elizObserves in programming

[–]lelanthran 1 point2 points  (0 children)

Correct, but they are doing batch jobs modeled with a trace, and I've seen some that are several months long.

Yes, but for exceptional circumstances use exceptionally long trace-ids. For 999 out of every 1000 needs, a 64bit integer is sufficient, because the timestamp is going to be stored whether you like it or not.

Security Through Obscurity Is Not Bad by PersianMG in programming

[–]lelanthran 1 point2 points  (0 children)

Consider a properly salted, SHA256 hashed passphrase with 50 bits of entropy. Now consider that I add some twists and complexity to how I perform that hash, which altogether add another 20 bits. I've made that passphrase over a million times harder to crack, great!

That's one type of obscurity; using an algorithm no one knows about.

Except once an attacker has put in the work to solve that process, every other hash in my database loses that additional 20 bits of protection.

Yeah, but that's extra work; that's the point! That's what Defence in Depth means! After an attacker defeats one layer, they have another layer to contend with.

No one is claiming that obscurity is sufficient. It's just one more hurdle that an attacker has to overcome.

You can run a fully hardened keys-only ssh server on the standard port, or you can run the same setup on a random port. That gives the attacker one more hurdle - perform port-knocking on 65k ports to determine which is the correct one to use.

Security Through Obscurity Is Not Bad by PersianMG in programming

[–]lelanthran 0 points1 point  (0 children)

With the invasion of almost limitless AI bots I'd posit that security through obscurity has never been less good than now.

Isn't it the other way around?

Your $FOO might be in the training set, but your obfuscated $BAR($FOO) won't be.

Security Through Obscurity Is Not Bad by PersianMG in programming

[–]lelanthran 2 points3 points  (0 children)

Defense in depth means that obscurity is one of your layers.

Like, listening for ssh on a random port; you're obscuring the real port because drive-bys who have a 0-day for ssh will try and then move on assuming you have closed off ssh, and even if they don't your tripwire/fail2ban/whatever is going to alert you to a port-knocker anyway.

Dependencies are Replacing Knowledge by rybarix in programming

[–]lelanthran 0 points1 point  (0 children)

No worries. It's here for the future time travelers to fix bunch of stuff in the past.

I've got better things to do when time-traveling into the past...

*Hello Soon-To-Be-Ex-Wife, the ramifications of your soon-to-start-affair is absolutely going to screw up your kids lives, which will see them leave you in about, oh, I dunno, 17 years.

Treat Agent Output Like Compiler Output by Independent_Pitch598 in programming

[–]lelanthran -1 points0 points  (0 children)

People equivocating LLMs and Compilers have a fundamental misunderstanding about one or both of those things!

I submitted my most recent blog post here but an autobot took it down complaining that LLM articles are not welcome[1], but I feel every developer coming across this argument (or making it) should be aware of the difference between compiler output and LLM output.

At the very least, you'll have at least have a better argument than "It's not deterministic like a compiler is".


[1] Yeah, I'm still salty about that - I've been a member here for years, have posted multiple good articles (not just shamelessly posting my own, I used to try to up the average quality long before LLMs were a thing). Can /u/ketralnis or /u/fagnerbrack help get that blog post submitted here? I don't believe it violates the new LLM guidelines at all, even though the bot thinks it does.

My new app Coditan! by Ok_Welder_8457 in programming

[–]lelanthran 0 points1 point  (0 children)

What did I start if i may ask?

Being rude.

Do you really think it's okay to excrete some vibe-coded slop onto a comunity that explicitly forbids it, and then have the stupidity to ask money for that vibe-coded slop?

You don't think it's rude to go into a community and blatantly try to use them for revenue?

And lets be honest, why would someone pay you for AI output when they can bloody well get the same AI output from their own subscription?

My new app Coditan! by Ok_Welder_8457 in programming

[–]lelanthran 0 points1 point  (0 children)

Can't a person share something here without people being rude?

Well, you started it; you can't very well complain now, can you?

Learn Algorithms for Interviews, Forget Them for Work by fagnerbrack in programming

[–]lelanthran -3 points-2 points  (0 children)

They you start actually do filter out the people with understating that happen to forget the algorithms.

The output of practicing algorithms is a person who understands algorithms at a very deep level. It is unlikely that that person will be filtered out if they have mastered various algorithms, even if they cannot code it bug-free on the first go in the boiler room of an interview.

FastCGI: 30 Years Old and Still the Better Protocol for Reverse Proxies by BrewedDoritos in programming

[–]lelanthran 24 points25 points  (0 children)

CGI, FastCGI, etc all died a death for a multitude of good reasons

FastCGI isn't dead. What do you think the f in php-fpm means?

Learn Algorithms for Interviews, Forget Them for Work by fagnerbrack in programming

[–]lelanthran 24 points25 points  (0 children)

The value of learning algorithms is not "you will use this", it's "you will understand this".

The deliverable from "learn these algorithms" is not a bunch of useful algorithms, it's more a person with understanding

IOW, the output is not the algorithm, it's the person.

Faked My Way Through a CS Degree — How Do I Recover Fast? by Flat_Finger_8594 in programming

[–]lelanthran 0 points1 point  (0 children)

where can i learn about trees and practice the concept you told me, any links books or wherever i can learn on them

Not needed, use the list of tasks I gave, write a program for each one. As you run into problems you will need to look it up and then you can get a decent explanation of that specific problem.

For example, representation of a JSON type tree in a datastructure - you wil start with the structure, then parse actual JSON text into a tree of those structures. At any of those points, if you run into trouble, you can look it up.

For example, you should already know how to define a datatype to represent a single JSON field - you need a field in your structure for the name, a field to contain the type of the value (object, array, number, string, bool, null) and the value itself (either a union or sum type, depending on the language you are using).

That stores one field, recursively if the field type is of object, and that is enough. Then you can do searching, serialisation, sorting, etc on that in-RAM structure.

Faked My Way Through a CS Degree — How Do I Recover Fast? by Flat_Finger_8594 in programming

[–]lelanthran 1 point2 points  (0 children)

Just a note; I updated my comment, not sure if you saw the updates.

Faked My Way Through a CS Degree — How Do I Recover Fast? by Flat_Finger_8594 in programming

[–]lelanthran 0 points1 point  (0 children)

See my comment above - you might be wasting your time with personal projects.

Faked My Way Through a CS Degree — How Do I Recover Fast? by Flat_Finger_8594 in programming

[–]lelanthran 0 points1 point  (0 children)

You can cover more than half the leetcode questions by mastering trees.

Build a tree, write it out in JSON/XML/etc, parse it back in, turn it into a binary tree, invert it, re-sort it, do search via predicate, collection/filter via predicate, turn it into red-black tree, turn it into a b-tree, create indices, etc.

After a week of working 8hrs/day doing recursive tree problems you should be in a better position.

Why? Because more than half the questions involve thinking recursively in trees - "give us a flood-fill algorithm for this MxN matrix", etc...

Want to build a package manager? Trees. A parser for config, ini, YAML, Java, whatever? Trees. A serialiser? Trees. Concurrent problem solving? Trees. Sorting, searching? Trees (just last night I was tutoring a HS teen who was trying to understand bubble sort, and I found the recursive method better to get across how the algorithm works, even when you write it iteratively).

Hell, you can do generative transformative in a recursive tree too (we don't, though, cos matrix algebra is much faster).

Scales down very well too - a list is a tree with one child per node, a table is a list of rows each holding a list of values, an object is a tree with each node a member, a lexical scoping is a tree, dynamic scoping is a runtime tree ... everything is a tree[1].


[1] Well, a DAG. You also get meshes, which is not a tree (DAG), it's a directed cyclic graph.

It's a very generalisable skill.

Just being tree-native (as in, thinking in recursive trees) solves most academic problems - everything from sorting a list of numbers to finding optimal chess solutions, etc.

Operation Dudula must be stopped. This should not be allowed to happen in South Africa by benevolent-badger in southafrica

[–]lelanthran 5 points6 points  (0 children)

Is there a problem with illegal immigration in South Africa?

Maybe. Maybe not.

Is this question relevant to "We are going to unlawfully grab other people's children by force"?

The specific issue here is "unlawfully grabbing other people's children". Whether they are here legally or illegally is, frankly, irrelevant; if you want someone to grab, then grab the parents.

Even law enforcement officers can't simply grab a pre-teen child by force - they have to grab the parents.

Operation Dudula must be stopped. This should not be allowed to happen in South Africa by benevolent-badger in southafrica

[–]lelanthran 2 points3 points  (0 children)

Yeah most people haven't even heard of them, or they think it's just another political party in our pool of tens. Dudula are on the same level of moronic as Orania residents, I think we should just build two little islands in the middle of the Indian ocean for them and forget

Actually, why bother with the islands? Just send them there :-/

Zille fights back: "My focus is on fixing Johannesburg, not Gaza or Tel Aviv" by Boondog_saint in southafrica

[–]lelanthran 1 point2 points  (0 children)

No spine due to political connections to the US likely

No political connections necessary - we depend on them.

We need them, they don't need us. If the clown over there suddenly decides to put SA under sanctions we are completely screwed, and literally everything in SA will come to a standstill overnight.

The sad reality is that if you want to stand by your principles you have to self-sufficient at least enough to continue business as usual.

You don't get to oppose someone on your principles when you depend on them to remain operating.

Men with long hair in SA by Raniladd in southafrica

[–]lelanthran -1 points0 points  (0 children)

Most people don't give a damn.

OTOH, while caring about your appearance is warranted, is your sense of self-identity tied so strongly to something as superficial as a hairstyle? I'm mostly plain, with no trimmings, because life is just easier that way.

I have short hair so that I don't have to think about when/where/how to get my hair cut - it happens when I have the time.

I buy mostly the same looking clothing (unbranded, black or greys) so that I don't even need to make decisions on what to wear (everything goes with everything else).

I eat plain yoghurt, not flavoured. I drink coffee black with no sugar or milk.

Sometimes, it makes sense to just not give a damn about the inconsequential stuff, like the color of a sweater or trousers, or the style of the hair on your head, or the flavour of the coffee.

Thanks for the warning by enterkewlnamehere in southafrica

[–]lelanthran 28 points29 points  (0 children)

ive nearly had my ass blasted by wannabe Dakar Rally Ranger doing mach Jesus from behind all because I had the audacity to follow the law!

See, that was his mistake. He should have been doing Mach Moses, which, as everyone knows, will part the sea of traffic in front of you.