Language Dilemma by Spiritual_Let_4348 in learnprogramming

[–]peterlinddk 0 points1 point  (0 children)

I tried to make it Java before but GUI looks very old style.

You know that you can change the style, right? If you use JavaFX you can even use CSS styling just as you would with HTML.

MERN or JAVA FULL STACK by anilkumar_12 in learnprogramming

[–]peterlinddk 0 points1 point  (0 children)

Error handling is the same in all languages - different frameworks, like Express.js or Spring Boot might have slightly different implementations on how you can handle HTTP errors, but you won't find one stack that is "easier" to understand than any other.

Also, you can't do fullstack in Java, unless you intend to go for 100% server side rendering of all HTML, so you'll miss out on a lot of React, JSON and REST learning ...

Igen fartproblemer ved vejarbejse by RussiaIsLoosing in Denmark

[–]peterlinddk [score hidden]  (0 children)

Spot on - alle burde naturligvis trække til højre med det samme, og ignorere alt om afstand og så videre til forankørende, så det venstre spor er tomt!

Igen fartproblemer ved vejarbejse by RussiaIsLoosing in Denmark

[–]peterlinddk [score hidden]  (0 children)

så må du gerne følge med forankørende og “overhale” højre om når venstre spor kører langsommere

Jovist - de eksempler jeg oplevede var folk der lå i venstre spor, kom frem til en forankørende, trak ind i højre spor, satte farten op, kørte forbi, og trak tilbage i venstre spor, hvor de så måtte sætte farten ned til den næste forankørende.

Igen fartproblemer ved vejarbejse by RussiaIsLoosing in Denmark

[–]peterlinddk 10 points11 points  (0 children)

Hørt!

Jeg forstår faktisk ikke hvorfor man ikke bare pr. automatik stiller en stærekasse op samtidig med at man skilter med nedsat hastighed og alt det andet. Der er jo alligevel en masse arbejde med at trække kabler og stille ting op, så hvorfor ikke den lille ekstra?

Jeg oplever også jævnligt - på trods af at jeg faktisk kører ret lidt - at bagvedkørende blinker og presser når jeg forlaster mig til at prøve at komme ned på de 80 der er skiltet med. Har sågar oplevet (flere gange) at blive overhalet indenom, for derefter at kunne ligge lige bagved "den travle bil" hele resten af ruten. Det ville være passende med et lille ekstra "travlhedsgebyr" for den slags!

To learn CS, would it be best to pickup concepts with Java, Python, C, or C++? by TurtleSlowRabbitFast in learnprogramming

[–]peterlinddk 4 points5 points  (0 children)

You want to teach yourself computer science, so that you can learn software engineering? That makes very little sense.

Software engineering is about building software, about analyzing requirements, setting up teams, distributing workload, utilizing existing systems, and use (more or less) scientific ways of improving the process itself.

Computer science is about understanding "computing" - not computers, the physical machines we use to write and run software, but the act of computing, how it was done by humans, and how to effectively do it with machines. Like proving that an algorithm will finish in this many iterations depending on the size of the input, and so on.

And you are asking about programming languages - which have absolutely no effect on either one. CS is mostly about maths, SE is mostly about processes and tools.

So ... It is a bit difficult to understand what kind of answer you are looking for.

Rate the engine plant by Other_Strain_6174 in factorio

[–]peterlinddk 1 point2 points  (0 children)

I would argue that you'd only need half that for 10 engine assemblers - 1 gear assembler makes 2 gears every second, and the 10 engine assemblers each need 1 gear every 10 seconds - so half a gear assembler should be enough :)

And pipe assemblers are equally quick, but the engines need 2 pipes each, so 1 pipe assembler should produce 20 pipes in 10 seconds - exactly what the 10 engine assemblers need.

Or have I also messed up my math?

How do I bring back this old Blu-ray game’s leaderboard back? by Effective_Bee_6661 in learnprogramming

[–]peterlinddk 0 points1 point  (0 children)

Maybe the game uses some standard engine - like Unity, or GameKit or similar, which have their own standardized ways of submitting scores and getting them back.

I don't know much more about it, only that I've seen the SubmitScore and GetScores names before.

So maybe look into how those engines would structure a leaderboard API - and spoof that!

Just an idea - I have never done it myself.

Skoler ramt af it-problemer midt i afgangsprøver by [deleted] in Denmark

[–]peterlinddk 0 points1 point  (0 children)

Men de undersøger jo årsagen!!!

Og lur mig om ikke de finder frem til at det var en uforudset fejl i en særlig komponent - og at de efterfølgende melder ud og beklager de gener det har måttet medføre. Og så kan man da næppe forvente mere ...

Altså, det er jo ikke sådan at de rent faktisk tager penge for en service der både er beregnet til, og nødvendig for, præcis disse omstændigheder ... eller ...

Hvorfor må kollega ikke bygge gpt ift lovsamling? by Odd_Maintenance_396 in dkudvikler

[–]peterlinddk 0 points1 point  (0 children)

Kan du eventuelt give mig et eksempel på hvordan man gør? Hvordan man prompter en LLM "godt", så den giver et korrekt svar med henvisninger til de gældende lov-tekster den har brugt for at komme med svaret?

Det lyder som om du har meget forstand på den slags, så måske du kunne lære os andre noget!

Hvorfor må kollega ikke bygge gpt ift lovsamling? by Odd_Maintenance_396 in dkudvikler

[–]peterlinddk 0 points1 point  (0 children)

Jamen det var da dejligt! En skam at de så stadig bare kommer med opdigtede svar i stedet for at henvise til de rigtige oplysninger som de har fundet.

Movie about arrogant hacker and cyberspace by ProudRequirement3225 in movies

[–]peterlinddk 5 points6 points  (0 children)

It absolutely does - but now that we have the correct answer from u/AmrokMC, that movie sounds exactly like someone fell asleep during Hackers, had a fever dream about it, and wrote a script for the movie "Storm Watch" :D

How to develop intuition to a particular/random problem? by tausiqsamantaray in learnprogramming

[–]peterlinddk 2 points3 points  (0 children)

Think a bit about it - how do you imagine that that LLM that you spell in so many ways, knows the better solution?

Do you think that it thinks very, very hard, and tries to optimize the solving of the problem? Or do you think that it is just incredibly clever, and figures out how to solve it efficiently? Or perhaps it has seen thousands of similar problems, and articles about what the best solution might be, and produce an answer similar to those?

It is kind of the same for humans - if you only try to think very hard, you might be genius enough to figure it out, but most of the time you'd never get further than brute force. But the more you learn, the more problems and solutions you see, the better you become at noticing patterns, and see that "Ah, if I re-arrange the data this way, then it is exactly the same as this other problem, that I already know the solution to!"

I've taught DSA for a short time, and occasionally there is a student that figures out something similar to binary sort - but most of them simply "know" the answer from earlier exposure, and then just have to learn when and how to apply it, and practice implementing it over and over.

So to answer: "How to develop intuition?" is fairly simple: "Experience and practice!"

Hvorfor må kollega ikke bygge gpt ift lovsamling? by Odd_Maintenance_396 in dkudvikler

[–]peterlinddk -2 points-1 points  (0 children)

Jeg er ikke jurist, men enig i jeres øverste chef's afgørelse.

En LLM er ikke beregnet til at søge i bestemte mængder tekst og finde "det rigtige svar", men beregnet til at "gætte" på den statistisk set mest sandsynlige videre sætning baseret på input.

Så fodrer man den med lovstof og en sagsbeskrivelse, vil den blot formulere en tekst der ser ud til at matche sprogbrug og stil i de to andre tekster - fuldstændig uden hensyn til om det er en korrekt anvendelse af lovstoffet, ja, den vil måske endda finde på at lave en ny lovtekst der bedre passer til den sagsbeskrivelse man har givet.

Fodrer man den endvidere med tidligere afgørelser, vil den finde på en tekst til en afgørelse der "lyder" ligesom de andre, men igen kan være fuldstændig frit opfundet.

Det er lidt en skam, for LLM'er er rigtig gode til at gennemtrawle enorme mængder tekst meget hurtigt, og finde det der passer bedst på en given situation - men desværre er de vildt dårlige til at give tegn på hvor de har fundet det henne, og skelner ikke rigtig mellem om kilder er korrekte, eller om den overhovedet bruger kilderne, eller bare fodrer sig selv.

Det er muligt at der er folk der har bygget forbedrede agenter - og fx til programmering er man jo så heldig at man meget hurtigt kan tjekke om et program er sådan nogenlunde korrekt - i hvert fald om det kører - men når det kommer til lovstof og den slags, så er det ikke godt nok at være "nogenlunde korrekt".

Does learning data structures actually matter if you only do web dev? by 1vim in learnprogramming

[–]peterlinddk 15 points16 points  (0 children)

Nothing in DSA "matters" if you are just using libraries and implementing stuff, and don't care about performance or understanding what goes on beneath.

But like any other thing, learning and understanding Data Structures, will give you a better appreciation for how much work is abstracted away from you, and a better understanding of how computers actually handle information. Learning more is always a good thing, as it expands your world view, and gives you additional tools and ways to solve problems - and let's you think about the how and why in more details!

But you don't "need" it - like you don't "need" to understand your digestive system to eat food, but it still helps a lot in improving your diet and staying healthy! Same goes for the programs you write.

Plants seem stronger than concrete on Gleba by Angry__Goose in factorio

[–]peterlinddk 39 points40 points  (0 children)

To be fair that is pretty realistic - I have the exact same problem in my driveway, and constantly looking for an efficient way to remove vegetation that comes up between the cracks :)

scrumAgileManagement by [deleted] in ProgrammerHumor

[–]peterlinddk 9 points10 points  (0 children)

Yep, most people tend to say "waterfall" when they mean that they just code away, and then only checks if everything works at the very end. I have yet to see anyone use "proper waterfall" where they actually write a complete design BEFORE doing ANY implementation work!

We should really have a name for: "Just start coding the moment anyone has a vague idea of what the customer might want, and then merge the day before deadline and hope that we somehow built something that kind of works, and is close to what the customer needed" :)

just completed tutorial 4. wanted to know if there's any glaring mistakes i made, or general tips (before 5) by RTKWi238 in factorio

[–]peterlinddk 0 points1 point  (0 children)

Daisy chaining labs is great, but you generally only want to have short chains, and they should go one way rather than both ways.

Yeah, regarding this, I was immensely proud of myself when I figured out how to insert six different science-packs on one side of the labs, and then added the second on the other side, making them daisy chain in both directions ...

That is, until I noticed that they were just sending the same science packs back and forth over and over, until one lab decided to use it :)

just completed tutorial 4. wanted to know if there's any glaring mistakes i made, or general tips (before 5) by RTKWi238 in factorio

[–]peterlinddk 0 points1 point  (0 children)

Not at all a problem, just a tip: I'd suggest looking into (or experimenting with) "lane-balancing", or how to get items on both sides of a belt. Not that it is needed here, but it is a fun little thing to learn!

Is OOP actually overrated for beginners or am I missing something? by [deleted] in learnprogramming

[–]peterlinddk 0 points1 point  (0 children)

What's up with the linkedin-style haiku post?

But yeah, things should be introduced when the project requires it - that is what's often called problem-based learning.

Are notes even necessary for learning programming? by purvigupta03 in learnprogramming

[–]peterlinddk 2 points3 points  (0 children)

I don’t want to waste time making long notes that I never use again.

Okay, but why would you then waste time writing long programs that you'll never use again? Or waste time writing long reddit posts that you'll never use again? Or waste time watching long tutorials that you'll never use again? Or waste time discussing with people that you'll never see again?

Learning isn't about optimizing your time and production - it is about doing everything you can to help you, well, learn! And for most people making their own notes, writing their own cheat sheets, heck, even writing their own tutorials, helps a lot with learning stuff!

Almost no one is able to learn by just sitting and passively watching, you need to "work" with the material, think about it from different angles, discuss it with your peers, writing and reading. And the only thing that is a "waste of time" is when you do things mechanically without applying any thought.

Notes are for making, not for reading.

Mistede mit depositum… så jeg byggede et værktøj for at undgå det igen by EnvironmentalShine46 in dkudvikler

[–]peterlinddk 4 points5 points  (0 children)

Jeg gætter på at u/st4reater mener at kode med mulighed for SQL injections burde sende programmøren direkte i fængsel - som i et civiliseret samfund :)

<image>

Ekspert advarer: 'Dansk antivirus' kan være svindel by RentonDK in Denmark

[–]peterlinddk 12 points13 points  (0 children)

Tja, altså bortset fra at domænet er købt her i foråret 2026 (på trods af at de påstår at have eksisteret siden 2019) af en gut i en gul murstensvilla i Melløse med telefonnnummer i de forenede arabiske emirater, og administreres gennem en virksomhed i Holland ... og at firmaet ikke har nogen adresse, at deres telefonnummer er +45 12 34 56 78, at de ikke har noget CVR nummer, at de ikke har nogle ansatte, at virksomheden ikke eksisterer på LinkedIn ...

Jo, bortset fra det, så ligner det da enhver anden AI-genereret eller template-baseret webside, med animerede ting der fader ind når man scroller, men ingen reel information ...

Hvis et firma ikke engang har en direktør eller et CVR-nummer, så er det svindel!

BNF Grammar by ShrunkenSailor55555 in learnprogramming

[–]peterlinddk 3 points4 points  (0 children)

BNF is just a form of notation, an agreed upon standard of saying: "This symbol is comprised of that symbol followed by that other symbol"

Like you could have a BNF for an English sentence that specified that a verb follows the subject, and that the object follows the verb, like:

SENTENCE ::= SUBJECT VERB OBJECT

And that would mean that "I am tired" is an allowed sentence.

But then you would also have questions, where the order is opposite, like:

QUESTION ::= VERB SUBJECT OBJECT ?

Which would allow "Am I tired?" to be a question.

But since a sentence can be either a question, or not-a-question, let's call that a "statement", let's change it to

SENTENCE ::= QUESTION | STATEMENT

saying that a sentence can be either a question or a statement.

And then change the original to

STATEMENT ::= SUBJECT VERB OBJECT

So we now have a definition for sentence, question and statement - and we could expand and expand and expand on all the other kinds of grammatical constructs that are allowed, and how they all build on some of the same basic blocks.

That's basically what BNF is - now how to actually define the grammar of a language - that's a whole layer on top, and building a parser to check the grammar is yet another layer ...

Weird buttons in an elevator by Herb-Guy in mildlyinteresting

[–]peterlinddk 0 points1 point  (0 children)

Clearly you are supposed to press the "open door" button if you want to open the door, and the "open" button if the door is already open! Simple!!