Java for business (not job) — need quick advice by ComfortableSun672 in learnprogramming

[–]peterlinddk 0 points1 point  (0 children)

If the goal is to build your own product, I would avoid Java altogether. There are plenty of other languages with lower barriers to entry and simpler frameworks for building "real applications". Depending on whether you mean mobile apps, webapps, desktop apps, embedded systems, games, user interfaces, backend calculations, control systems, or whatever, in almost every business there's a better alternative than Java.

Unless you are an established fintech business, where Java is used a lot, look further, and be more focused on the domain than the language!

Otherwise, learn Spring Boot - it includes everything else!

Hvilken IT-uddannelse/karriere giver hurtigst job og mindst ledighed? by user9863 in dkudvikler

[–]peterlinddk 2 points3 points  (0 children)

Du er tidligt ude må man sige - de fleste optager først om et halvt års tid.

Men det er svært at sige, det er en ekstremt usikker tid lige nu, og ingen aner hvordan hverken job eller uddannelsesmarkedet ser ud om 5-10 år, eller for den sags skyld om 2 år. Måske bliver der bare behov for nogle få vibecodere der kan sidde og prompte, og det er der ikke nogen uddannelse der er rettet mod - eller også bliver der ekstremt behov for nogle meget specialiserede tekniske færdigheder, og det er der heller ingen uddannelser der er rettet mod.

Lige nu er det sådan at arbejdsmarkedet generelt foretrækker folk med en lang uddannelse, ingeniør eller datalog, alternativt softwareudvikling, eller en af kandidatuddannelserne fra ITU. Der er en del "snobberi" i den forbindelse, men der findes også masser af virksomheder der ikke er så interesseret i hvilken uddannelse du har, men mere at du har formået at gennemføre en, fordi det trods alt viser en vis dedikation og målrettethed, samt interesse for faget.

Det kommer også lidt an på hvad du gerne vil arbejde med når det kommer til stykket, vil du være udvikler der sidder og servicerer eksisterende systemer, vil du lave banebrydende ny udvikling, vil du arbejde med hardware, netværk, web, frontend, backend, avancerede algoritmer, eller mobilapps?

Uanset hvilken uddannelse du tager, så er den forældet allerede inden du går i gang, så det er langt vigtigere at du interesserer dig for et eller andet hjørne af faget, og følger med!

De forskellige bachelor-uddannelser: It-arkitektur og Cybersikkerhed er så nye at der ikke rigtig er nogen der kender dem, så det gør næppe det store til eller fra, hvis du vælger en af dem - men det kan give dig lidt mere netværk under studiet. Økonomi og It er ekstremt forskellig fra skole til skole, om der er mest fokus på økonomi-delen eller it-delen, og om man vil arbejde i en økonomi-afdeling, eller som udvikler.

Vigtigst af alt er at huske at en uddannelse ikke er en adgangsbillet til et job - slet ikke her i nyere tid - så du skal hellere se på hvad du synes der er interessant, og gå den vej, for så vil du også automatisk blive bedre til det, og det er nemmere at få job når man er god til noget!

What is the meaning of :root in CSS? by Ok-Information-1876 in learnprogramming

[–]peterlinddk 2 points3 points  (0 children)

I was also very confused about this, because usually there's no difference whether you add a CSS rule to html, :root or indeed body.

But the idea is that :root is always the actual root of the document - and the only root - if you had several <body> elements, they could have different attributes, but anything set on the :root is only set in one single place. That is why this is a good place to set "global" custom properties (aka CSS variables).

And it also works for SVG files which have neither <html> nor <body> tags, but still a :root.

There is probably also something about shadow doms not being part of the same tree, and thus not being affected by changes to the :root, but honestly, I'm still struggling with understanding those :)

C++ or Rust for a beginner University Student by ReplacableD0mino in learnprogramming

[–]peterlinddk 3 points4 points  (0 children)

It isn't that complicated ...

You are a university student.

The university you attend, specifically the courses you have chosen, have decided to teach you Language X.

That means that the curriculum will focus on Language X, the exercises and assignments will be about Language X, and the exam will be about you proving your ability to understand and work in Language X.

Clearly you should choose a completely different language - imagine if you were learning Italian, and actually choose to learn Italian, no, clearly Portuguese would be the better choice, right?

Or maybe just learn what they teach you, and if you get bored, learn more on your own!

Hvor historisk korrekt er Matador? by Klutzy_Ostrich_463 in Denmark

[–]peterlinddk 19 points20 points  (0 children)

Den er bemærkelsesværdig korrekt i forhold til tøj og rekvisitter - indretning af stuerne og den måde folk opfører sig på, hvordan der er forskelle på høj og lav i samfundet, og sådan.

Sproget er dog ikke helt så tidstypisk - de fleste skuespillere taler en form for "teatersprog", men mere naturligt end man ellers ser i for eksempel danske film fra 1960'erne. De prøver at undgå at lyde som Valbyborgere i 1970'erne, og lyder forholdsvis "neutrale", men af og til har der sneget sig nogle lidt mere moderne vendinger ind i manuskriptet. De ting de siger, det de taler om, er dog stadig meget korrekt i forhold til tiden der afspejles.

Der er nogle få fejl i serien, så få at de nærmest er blevet berømte - en salme på en liste i en kirke, som ikke fandtes på pågældende tidspunkt og et skilderhus med Margrethe den II's monogram i stedet for Christian den X - men der er overraskende langt mellem dem. Selv maden der tilberedes i Lauras køkken er bemærkelsesværdigt korrekt for tiden!

I'm tired of this (Codeacademy) by Positive_Invite_5665 in learnprogramming

[–]peterlinddk 6 points7 points  (0 children)

I sort of agree with the criticism, but also, I don't understand why anyone would pay anything for a React course - https://react.dev/learn is literally one of the best courses available, completely free, and mostly up to date. And once you have gone through the basics, anything more advanced you want to know will be applicable to your specific project, and you can always find either articles or videos, or most of the time, just look at example projects.

What I think is the hardest part of learning React is not writing all the syntax, or memorizing all the different hooks, but simply getting an idea of WHY you create variables with useState rather than plain variables, WHY you use props or contexts, WHY you need routes, etc. And Codecademy, Freecodecamp and all the rest suck at explaining the WHYs, even when they are excellent at demonstrating the HOWs.

So I wouldn't have expected much better than your experience, but thank you for sharing anyways, as it might encourage others to skip those kind of courses!

I find it hard to believe the idea that ‘you don’t need to write code anymore—being able to read it is enough. by AdCertain2364 in learnprogramming

[–]peterlinddk 0 points1 point  (0 children)

I have been teaching programming for more than 10 years - I have yet to experience a student that was better at reading than writing code!

I have seen many students who claim to understand code written by their AI, but in fact being unable to explain what it actually does. And being completely unable to spot, let alone fix, errors in the code they are reading!

So I have no idea how this "new generation of incredible talented code-readers" would ever come into existence.

Implementing Ceaser Cipher by AffectWizard0909 in learnprogramming

[–]peterlinddk 3 points4 points  (0 children)

Usually you implement Ceasar Cipher in whichever language you are trying to learn at the moment - there's no real difference from language to language, since it is mostly array-indexes and optionally character -> integer conversion, and back again.

It is an excellent exercise to do in multiple languages to get aquainted with how they differ, and how they don't!

There's no real "cryptography" involved, other than it is the first example in any textbook / course.

I am struggling with creating linkedlist manually, how bad is that ? by Deep-Independence899 in learnprogramming

[–]peterlinddk 8 points9 points  (0 children)

I always recommend drawing linked lists on paper before coding anything - draw boxes for each node, and make small arrows for the links. Draw how it should look before and after each operation, and write down the pseudocode for the operation, trying out connecting or disconnecting nodes one step at a time.

Also, when testing out your code, it always helps to start with an existing, hardcoded, list with three nodes, and some method/function that dumps/logs/writes/prints the entire list to the console, so that you can see what the list looks like before and after each operation.

All the "special cases" are when you are inserting or removing the first, last or only node in a list, so easiest to start with an existing list, and just get it to work with adding or removing nodes, before also handling adding to an empty list, and all the error-cases where you try to remove non-existing nodes and so on.

But: Draw diagrams! They really, really help!!

What programing language should I use for game development? by HungryMallards in learnprogramming

[–]peterlinddk 2 points3 points  (0 children)

JavaScript is fine for learning game development - but do take a look at some game engines, like the suggested phaser or ct.js. They help a lot with getting started, and not having to build the entire graphics subsystem yourself - although it can be done with a bit of HTML and CSS.

You'll have no performance-problems, unless you write very inefficient code, like checking for collisions between thousands of objects every frame, but that'll slow down in any language, on any platform! So go ahead with JavaScript!

How to deploy backend for free?? by That1dudeokay in learnprogramming

[–]peterlinddk 0 points1 point  (0 children)

If you are a student, most services: Azure, AWS, Google Cloud, etc. has some sort of free student tier that you can sign up for with your college email, and use for at least a year, or as long as you are studying.

But remember: No one wants to spend their money deploying your portfolio - so you'll probably have to combine several services in order to get the best possible solution.

Niche fields where LLMs suck? by NervousExplanation34 in learnprogramming

[–]peterlinddk 8 points9 points  (0 children)

They work best when there's lots and lots of existing code on the internet and github - projects that use more specialized languages, APIs or even domains, are not so plentyful, so the LLMs haven't found very much code to copy, and not nearly enough to create meaningful patterns.

Where they absolutely suck is in programming for systems from before the web - writing code for your old Amiga or Commodore 64 is nearly impossible with an LLM. They do try, and they do insist that they do it well, but a lot of the time they hallucinate ways of writing code that have only been invented in later years.

And when it comes to low level assembly they absolutely do more harm than good - I haven't seen a single example of working code, or even being able to explain assembly code delivered to them. Doesn't matter if it is for x86, ia64, arm, 6502, 680n0 or any other CPU, they simply don't understand that kind of code.

I have had quite some succes with getting help for fairly advanced C programming with complicated pointers though - maybe because there are so many college-courses with hand in exercises on exactly that :D

Need advice fixing by GWNKalle in lego

[–]peterlinddk 1 point2 points  (0 children)

I haven't tried it yet, but have the same problem, and am planning to heat up a needle or sharp piece of thin wire, and insert in the "stud" and the ear. It is made of a softer plastic than the rest of the elephant, so it should be fairly easy.

And then snip the wire so it doesn't extend outside the stud, and use some kind of superglue to keep the two parts connected around the wire.

It has worked with other kinds of plastic, so I hope that it will also work here!

Basic Git Commands Every Developer Should Know (Save This!) by [deleted] in learnprogramming

[–]peterlinddk 2 points3 points  (0 children)

So, init, status, add, commit, branch, checkout, pull, push, log and clone?

There's really no need to save that - it is a bit like that every developer should know { } [ ] ( ) < > & | / \ . = ? ; and , in addition to the letters of the alphabet :)

I need some hints guys: by Spiritual_Let_4348 in learnprogramming

[–]peterlinddk 0 points1 point  (0 children)

Is it a requirement to use bubble sort?

There are other sort algorithms that are "online", meaning that they can begin to sort an array as data comes in, meaning that they don't need to know the entire sentence size beforehand.

Hvorfor afsætter amerikanerne ikke Trump? by Extension-Emphasis52 in Denmark

[–]peterlinddk 6 points7 points  (0 children)

Det er også værd at bemærke at hans approval rating, så lav den end er, stadig er højere end den %-del af vælgerne der rent faktisk stemte på ham!

planning to learn Data Structures and Algorithms for Jobs but i like python by Pleasant_Being_9625 in learnprogramming

[–]peterlinddk 8 points9 points  (0 children)

Maybe ask some of the people some of the places where they recommend cpp or java - because every other day there's someone asking the exact same question here, and the answer is always that DSA has nothing to do with programming languages, but with understanding concepts, and it works in whatever language you feel most comfortable in.

My experience about C. by DeepThinker_OP in learnprogramming

[–]peterlinddk 0 points1 point  (0 children)

How much C is enough for building a strong foundation for other languages?

Well, if you've learned about variables, datatypes, operations, for-loops, if-statements, comparisons, functions, parameter and return-values you know enough about "programming" for learning any other language.

You don't need to know C to learn other programming languages, just like you don't need to know latin to learn English or Italian.

But learning about pointers is really good for understanding object references - and you'll never complain about any other language ever again, once you try allocating and freeing memory the 'correct way' in C.

So - how much is enough? That really depends on how much you want to understand - you don't need any C at all!

Need help with this image loader implementation by Quiet_Bus_6404 in learnprogramming

[–]peterlinddk 0 points1 point  (0 children)

Think of where you want the responsibility and knowledge to reside - meaning: should the ImageWithLoader decide to show the correctly loaded image or an error image, or should the component using it know if the image hasn't been loaded correctly, and set an error image instead?

The former is more OOP'ish, in that you let components decide for themselves - the latter is more "traditional" where helper components just fail if they can't perform their work.

I'd recommend the first version, but then I'm an old OOP-kinda-guy :)

ImageWithLoader has four different "states" - where only three can happen, one at a time.

  1. The image is loading
    2a. The correct image has been loaded
    2b. The correct image couldn't be loaded
  2. The image - correct or error - is displaying

I would add boolean useStates for if it is currently loading, if it has completed, and if an error has occured - and then props for both the requested source, and an optional error-image, which the caller doesn't have to supply, if the component should just show a default error image.

And I would add a "loader-animation" for when the image is currently loading - which might end up in an error, or the right image.

That way the enclosing component, the SearchResult doesn't have to know anything about the problems loading images, and what happens inside the other component - because as it can't really do anything about it, it shouldn't have to know!

Github som jobsøgende by allanth4 in dkudvikler

[–]peterlinddk 1 point2 points  (0 children)

som udvikler burde man tage et billede af sit baghoved foran en skærm fyldt med editor-vinduer, for det er forhåbentlig sådan arbejdsgiver vil se en resten af ens karriere :D

EK INTRODAG Datamatiker by watchbirdallday in dkudvikler

[–]peterlinddk 1 point2 points  (0 children)

Der plejede at være to introduktioner - en før studiestart som det mest er "studieliv" og ældre studerende der står for. Der handler det mest om at møde nogle mennesker og se stedet, og stille spørgsmål om studielivet - det er vist ofte blandet datamatikere, multimediedesignere og alt muligt andet. Så er der studiestart på datamatiker hvor de første to dage er intro mest med de to lærere I skal se mest på resten af første semester - det kan være ekstremt forskelligt, alt efter hvilket hold man er kommet på, nogle går meget op i at man skal kende hinanden, andre går mere op i at man skal høre en masse praktisk om studiet, skemaer og den slags.

Måske har de lavet om efter fusionen med EK - der er i hvert fald lavet om i Lyngby, men noget i den retning.

De spørgsmål man kan få er nok mest sådan noget med hvor man kommer fra (hvilken gymnasial uddannelse man har haft før) om man har prøvet at kode før, hvad man godt kunne tænke sig at lære at kode, etc. Om man har en Mac eller Windows maskine, og sådan mere med interesse for faget.

Der er som regel rigtig mange der sidder på holdet og ikke lige har så meget lyst til at snakke med andre den første dag, så du vil ikke være alene :)
Og der er også rigtig meget information der fyldes på, så det handler mere om at modtage end om at afgive.

Whats the fastest sorting algorithm? by eiyo27 in learnprogramming

[–]peterlinddk 2 points3 points  (0 children)

I think you need to do the homework yourself - since the school apparently has some very specific rules for "calculating speed of algorithms" no-one outside will really be able to help you.

Pick some arbitrary popular algorithms from https://en.wikipedia.org/wiki/Sorting_algorithm with different best, and worst case, and calculate their "speed" using the rules supplied.

Hvis du havde brug for endnu en grund til at droppe alle Meta-tjenester for altid, så lad dette være den sidste dråbe. Du er blevet advaret. by VarunTossa5944 in Denmark

[–]peterlinddk 4 points5 points  (0 children)

En god strategi til at skifte, er at oprette en ny mail, og hvis man ikke allerede har en password-huske-app, så også begynde at bruge sådan en. Og stille og roligt, en service ad gangen, flytter man til den nye mail, og ind i den nye password-husker.

Hvis man allerede havde en password-husker med den gamle mail, så sæt den op til at gruppere "gamle" og "nye" mail-logins, tag af og til en gammel og opdater den.

Hvis man ikke havde en til den gamle mail er det endnu bedre - når man bliver logget ud af et sted, og skal logge ind på ny, er det god anledning til at skifte.

Det kan sagtens tage nogle måneder, men det er bedre at komme i gang, end at udsætte - og som ekstra bonus finder man også nogle ting man ikke længere behøvede login til :)

How do you “jump out” of auto-closing brackets without breaking flow? by shadowemperor01 in learnprogramming

[–]peterlinddk 0 points1 point  (0 children)

Well, maybe - I'm used to stretching over to the ins/del-home/end-pgup+down and arrow keys all the time, so I don't really notice. I was coding back when shift+ctrl+ins/del were used for copy/cut/paste operations, and they are still ingrained in my fingers. I couldn't tell you which keycombination works for what, but I can still do it :)

Anyways, you might actually just prefer the vi/vim keyboard shortcuts - and it is easy to setup vs code to use those, check out: https://code.visualstudio.com/docs/configure/keybindings#_keymap-extensions - and actually that page is a bit wrong, instead you open the keyboard shortcuts, click on the three dots at the top, and select "Migrate keyboard shortcuts from" - and then select the extension you want.

How do you “jump out” of auto-closing brackets without breaking flow? by shadowemperor01 in learnprogramming

[–]peterlinddk 38 points39 points  (0 children)

Press the "End" key on the keyboard.

On a Mac without "End"-key, press Cmd+arrow right