andioop

joined 1 year ago
[–] andioop 2 points 1 week ago

For some ideas of what to do, this post by Teri Kanefield has a list of concrete actions that you can take: https://terikanefield.com/things-to-do/

Very much appreciated.

[–] andioop 2 points 1 week ago

Me, pretty sure game dev is going to just be a hobby for me and that I will never try to sell a game, still enthusiastically reading the game marketing articles because they are interesting and it's cool to know the strategies being used to market to me so I can be better prepared…

[–] andioop 4 points 1 week ago* (last edited 1 week ago) (1 children)

I have been using some of the learning resources, specifically this one https://linuxjourney.com/. I hope the video recommendations are helpful to you but I am kicking myself for not adding "also I really hate watching videos and would prefer to read something" to my original post. I have not actually made the switch yet, I want to back up my files first. Bought a new external hard drive with enough space. It was nonfunctional. Had to send it back for a warranty replacement and am waiting on the new drive to show up. Will reply again if I remember once I actually manage to switch over.

[–] andioop 1 points 1 week ago* (last edited 1 week ago)

[email protected] for people who that link is not working for. (I, personally, get a couldnt_find_post error.)

Sometimes I have been told my links don't work by some other people, but they work for me logged in and logged out. Wonder if it's that we're using different clients, and if your link would work for the people who cannot open my link successfully.

[–] andioop 2 points 1 week ago* (last edited 1 week ago)

Wait no, I never had to change IDs. They are all unique and have been since I first defined them. I meant that the ID attribute of my element is the same as its name attribute and also its value attribute. Does any of the advice change given this?

Thank you!

[–] andioop 2 points 1 week ago

Thank you again so much for your advice. I read it all :)

[–] andioop 1 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

I am curious if it is viable to do it just pure JS or if I really need to learn some popular frameworks/libraries. I have no idea where this resistance comes from, guessing it's perhaps because "oh wow a whole framework" seems more intimidating than "learn to fix your code in a language you already know a little bit", as someone unfamiliar with frameworks. I should probably learn them anyways.

I do have some of the code commented but I also recently found according to https://refactoring.guru that this is bad?

Final thing: most resources I am aware of are for cleaning up object-oriented stuff. Wondering about resources for cleaning up non-object-oriented stuff and when I should and should not be doing object-oriented stuff, seeing as I did not write this raw JS object-oriented. (Yes, I know you can still kind of imitate some of the design patterns anyways, just curious.)

Also need to find out if if's okay to have the same thing appear twice in the HTML and how to put that in a constant if not, or if it would be better to programmatically generate it because a lot of it is pretty repetitive and the same string everywhere (except for the name attribute sometimes).

Again, thank you so much for your advice! I'll definitely be checking these resources.

42
submitted 2 weeks ago* (last edited 2 weeks ago) by andioop to c/linux
 

Local dummy here (slightly more technical than the average user, likely far less than most people in this community) considering switching over. Checked the sidebar for any beginner's resources and looked at a few of the top posts and saw mostly Linux news and stuff meant for people already using the OS.

For my specific case, I use a Mac as my daily driver and (heresy) I am happy, but I also have a Windows computer that I am thinking of switching over to Linux. I use it to play games my Mac can't, and to run [email protected] (I do not run the community but the thing the community is about) and/or Folding at Home whenever I'm not using it to game. Some of them are Steam games, some indies not on Steam, some emulated. Little to no multiplayer games, and absolutely no multiplayer that has anticheat. I have tried running some of the Windows-exclusive games with WINE and they worked but ran extremely slowly, however that was done on my Mac so it may not represent the results of running WINE on Linux.

[–] andioop 2 points 2 weeks ago* (last edited 2 weeks ago) (5 children)

It is JavaScript!

I wanted to say just thank you so much for your feedback and help, I really appreciate it. I'll probably try to handle it as an array until final display to the user (tbh probably just me), where the commas and spaces will be used because that's how English works and seeing an output of stringOne,stringTwo,stringThree without the space would just irritate me a lot.

I am aware of unit testing and know I should use it. I also didn't use any frameworks and I'm not sure what I should use to test it when I didn't use Node.js or React or anything like that (not sure if "framework" is the right word). My only knowledge of them is that sometimes when I fork other peoples' projects I have to do stuff like npm install and npm run build and I have a vague overview idea of what those commands do (install dependencies, compile the stuff and run it). What I actually did to test things was just using the website. I let it go because it is small, under 200 lines of code, and probably will not expand very much.

Specifically the actual JS never has the string written down! I grab it from the HTML. Where it does show up several times: the element's name, ID (wonder if I can just wipe it out of the name), often its value, and in the element's label in the for attribute. Not sure what best practice is here.

[–] andioop 2 points 2 weeks ago* (last edited 2 weeks ago) (7 children)

I actually wrote it just once. It acquired the space like this:

I concatenate a bunch of strings together, and add a comma and space between them so I could get stringOne, stringTwo, stringThree etc. I later need to decompose that. I remembered I separated stuff with a comma, but forgot about the space following the comma and that is how I ended up having to deal with " NameHere" vs "NameHere" without having actually written NameHere several times in my code. Is there a better way to go about this?

I have also just read my post again and it explicitly contradicts "I actually wrote it just once". Not sure if I did write it multiple times and merely forgot as I typed this comment and claimed to write it just once, or if I just pretended I wrote it multiple times when it was only once so I could simplify explaining my problem. For the purpose of my question though, let us pretend I did write it once. I promise I am aware that strings that are frequently used should be made constant, although I could use more specifics on what "frequently used" is (more than once?) and I'm wondering if you actually should not really use strings at all and always go for constants.

[–] andioop 5 points 2 weeks ago* (last edited 2 weeks ago) (9 children)

Not sure if this question is too noobish for [email protected] so I posted it here just in case.

18
submitted 2 weeks ago* (last edited 2 weeks ago) by andioop to c/learn_programming
 

I just spent an hour searching for how I could have gotten an

Uncaught TypeError: Cannot set properties of null

javascript. I checked the spelling of the element whose property I was trying to set and knew that element wasn't null because the spelling was the same in the code as in the HTML. I also knew my element was loading, so it wasn't that either.

Turns out no, the element was null. I was trying to set " NameHere" when the element's actual name was "NameHere".

Off by a single space. No wonder I thought the spelling was the same—because all the non-whitespace was identical. (No, the quotation marks slanting in the second NameHere and being totally vertical in the first NameHere wasn't a part of the error, I am typing them all vertical and either Lemmy or my instance is "correcting" them to slanted for the second NameHere. But that is also another tricky-to-spot text difference to watch out for!)

And what did not help is that everywhere I specifically typed things out, I had it correct with no extra spaces. Trying to set " NameHere" was the result of modifying a bunch of correct strings, remembering to account for a comma I put between them, but not remembering to account for the space I added after the comma. In short, I only ever got to see " NameHere" written out in the debugger (which is how I caught it after like 30 repeats of running with the debugger), because everywhere I had any strings written out in the code or the HTML it was always written "NameHere".

I figured I'd post about it here in case I can help anyone else going crazy over an error they did not expect and cannot figure out. Next time I get a similar error I will not just check spelling, I'll check everything in the name carefully, especially whitespace at the beginning and end, or things one space apart being written with two spaces instead. Anyone else have a similar story to save the rest of us some time?

[–] andioop 2 points 2 weeks ago (1 children)

I am oddly charmed by the drawing, did you make it yourself?

While we're here the quote is displaying

like this for me, made with >>

instead of like this, made with just one >

 
 

Besides some of the very, very obvious (don't copy/paste 100 lines of code, make it a function! Write comments for your future self who has forgotten this codebase 3 years from now!), I'm not sure how to write clean, efficient code that follows good practices.

In other words, I'm always privating my repos because I'm not sure if I'm doing some horrible beginner inefficiency/bad practice where I should be embarrassed for having written it, let alone for letting other people see it. Aside from https://refactoring.guru, where should I be learning and what should I be learning?

 

I like browsing Local here because of that.

38
What language is this? (programming.dev)
submitted 1 month ago* (last edited 1 month ago) by andioop to c/software_gore
 
8
submitted 1 month ago* (last edited 1 month ago) by andioop to c/[email protected]
 

I read something about once-reliable sites that would tell you the best [tech thing] now not giving legit reviews, being paid to say good things about certain companies, and I do not remember where I read that or which sites, so I figured I'd bypass the issue and ask people here. I'm pretty new to anything near the level of complexity and technical details that I see on datahoarder communities. I know about the 321 backup rule and that's it. This is me trying to find something to hold copy 3 of my data.

110
Technically right…? (programming.dev)
submitted 1 month ago by andioop to c/software_gore
 

You'd think they'd just get rid of the indicator after I show up, or the day after the appointment, instead of leaving it there and saying I have -1 days left until it happens…

 

Not the creator, just stumbled across this and thought FOSS on Beehaw might like it

 
 
view more: next ›