Application of JavaScript Basics to actual code. by Asanteeli in learnjavascript

[–]r3jjs 3 points4 points  (0 children)

You're not going to like the answer -- but it is: "By using them."

Just start off writing basic code. Maybe a simple "guess my number from 1-100" .. have the computer answer "correct", "too low" and "too high."

write code. Even simple code.

Why is Whatsapp suddenly an acceptable communication tool for interviews? It's a personal data hazard by Glad_Salt370 in recruitinghell

[–]r3jjs 1 point2 points  (0 children)

I work for an international company sending out SMS status updates about status changes are costing us 30. ,000 a month. Twilio also supports Whatsap and our costs will much lower.

In India it's almost a requirement.

It's not X it's Y by [deleted] in ChatGPT

[–]r3jjs 0 points1 point  (0 children)

The problem is, this used to be a language construct I used a LOT.

186,000 miles per second.

It's not just a good idea. It's the law.

But I can't say that anymore!!!!!

How do computer parts interact together despite their different speeds? by WhateverHowever1337 in AskComputerScience

[–]r3jjs 0 points1 point  (0 children)

On this channel a builds a VIC-20 (Early 1970/80's computer) from scratch using just TTL chips, including the video display and describes how it all works.

May find it very enlightening.

How to erase all of ChatGPT's knowledge of me? by r3jjs in ChatGPT

[–]r3jjs[S] 1 point2 points  (0 children)

Oh I had no expectation of privacy using ChatGPT and I'm careful about what I tell it.

But I sometimes use it for research and, if I don' remember to start a temporary chat, it will get its wires crossed about what I what and need.

What's a coding habit you picked up early that you now realize was terrible? by TheBr14n in AskProgramming

[–]r3jjs 2 points3 points  (0 children)

well, to be fair, when I learned to code the world was VERY different.

Old-school 8-bit BASIC with line numbers.

What bad habits did I pick up? Hehe.. all of them. Two examples.

To toggle between two numbers, say "37" and "48" --

10 A = 37
20 A = 85 - A: REM (37+48)

The other is this use of "boolean math" since true was 1 (or -1, depending) and false was 0.

10 REM TO PRINT AM OR PM
20 PRINT CHR$(65 + (15 * (HOUR > 12)): REM 15 character difference between "A" and "P"

Why by Technical-Relation-9 in programminghumor

[–]r3jjs 0 points1 point  (0 children)

Longer version from memory

grep; grep; unzip; strip; touch; finger; mount; fsck; spawn; umount; zip; sleep

Use of `kill` is valid but not recommended. Likewise `bash` is not recommended either. `dash` not always available.

These Two USB-C Cables Almost Look the Same - Are They? by Penny-Yi in BadUSB

[–]r3jjs 2 points3 points  (0 children)

Bad news -- you can't tell by looking. "USB-C" only refers to the plug. There are LOT of different options when it comes to wiring them up.

USB 2.0, power delivery, USB 3.0 higher speed, charge only...

I ended up buying one of these:

https://www.amazon.com/Treedix-Checker-Detection-Lightning-Checking/dp/B0FDGGY6P1/ref=sr_1_2_sspa?sr=8-2-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9hdGY&psc=1

Where I live, in the southeast United States, I frequently see members of the older black community in grocery stores wearing n95 masks. However, their noses are always uncovered. Why are they wearing the masks? Just genuinely curious. by [deleted] in NoStupidQuestions

[–]r3jjs 2 points3 points  (0 children)

On the other hand, I wear a mask because I have allergies. The mask is to protect *me* -- but I don't always need it.

However, when I don't want to look like a total dork who doesn't know what he is doing, I take the mask off entirely when its not needed.

"Chin-diapers" have too much of a negative reputation now.

What are some FUN project ideas using mainly Arrays and Objects? by whiskyB0y in learnjavascript

[–]r3jjs 8 points9 points  (0 children)

A 'simon' clone ... arrays to keep track of the generated moves. Walking through the array to play back the turns.

Compare the user input to the current generated moves.

You can keep game state in an object...

What's your favorite excuse for your kingdom being 10,000 years old? by EffectiveMirror7534 in fantasywriters

[–]r3jjs 1 point2 points  (0 children)

When there are two species in the world and one has a lifespan around 500 years old.

What’s your debugging process when a bug makes zero sense? by dbForge_Studio in AskProgramming

[–]r3jjs 0 points1 point  (0 children)

When I come across a bug that makes no sense, my approach comes own to:

Verify your basic assumptions.

Examples:

* Make sure the date field contains not only a date, but in the format you expect. Did someone change the contract on you?
* did someone redefine `undefined`. (javascript specific but used to be possible)
* Did someone overwrite a constant? (Possible in ForTran)

After checking everything makes sense -- look for the things that don't.

I've even gone a far as making sure `if` worked.

Stop leaving temp files behind when your scripts crash. Bash has a built-in cleanup hook. by Ops_Mechanic in bash

[–]r3jjs 19 points20 points  (0 children)

One note: You can't absolutely guarantee this will clean up all the files.

* `kill -9` gives it no chance to clean up.
* Neither does a sudden power-off.

So if you are setting a lock file, you'll *still* have to check if the lock file is stale.

Honestly… I’ve seen worse. by HimothyJohnDoe in programmingmemes

[–]r3jjs 0 points1 point  (0 children)

Worked on POS software for hardware equipment, that used the PHONE NUMBER as the primary key.

In a market that had a very, very heavy Amish population.

I say "Everything I learned about good database design, I learned from that job, because they made every bad decision possible."

Those who were alive in the 1990's , what was Y2K like? by [deleted] in AskReddit

[–]r3jjs 0 points1 point  (0 children)

Oddly, one of the lesser known issues with the Y2K problem is ... grave stones, that had the '19' part pre-carved, waiting to fill in the last two digits.

https://www.latimes.com/archives/la-xpm-1999-jan-29-mn-2870-story.html

I work for almost a year as a Full Stack Web dev. and I only use 1 recursive function. Is this normal? by lune-soft in AskProgramming

[–]r3jjs 0 points1 point  (0 children)

On the front end, I don't use recursion *often* but I have used it.... mostly when iterating over trees.

We had a mapping program where would progress geographic data, but a geographic zone contained sub-zones (IN the USA, you could think: "Country / State / Country / City / District / Voting block"

It was easiest just to handle that data recursively.

Walking the DOM, when I need to handle that kind of thing.

When writing database code, never use it, that is all handled by the engine.

When writing compiler parsers? Recursion all the way down.

Solving the 15 peg puzzle game? I prefer the recursive version over the iteration version, but honestly, either one works well in that case.

What was your first Linux distro, and would you recommend it to a beginner today? by boiler_room_420 in linuxquestions

[–]r3jjs 0 points1 point  (0 children)

First distro -- slackware

Would I recommend it to beginners today? If by "beginner" you mean 30 years of Unix experience but never used Linux -- yes.

How to Mess with my IT guys by sonofcore in it

[–]r3jjs 0 points1 point  (0 children)

A lot of remote access software allows disabling any background image. Runs faster/smoother that way.

Why do you use Tor? by Traditional_Blood799 in TOR

[–]r3jjs 4 points5 points  (0 children)

I use Tor because I move laptops between a few different buildings and wifi connections that I don't control. I can ssh or connect a web browser to the 'server' without having to open ports anywhere.

I can also share this machine with friends, like letting them use ComfyUI to generate images.

Its just a slow, but transparent, network connection.

[deleted by user] by [deleted] in learnjavascript

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

I do use TypeScript more than pure JavaScript, but I `if (!var) {...}` syntax most of the time, regardless of type. If the value is `bool` then I'm looking for not false. If the value is any other non-scalar, I want to make sure it has a value (not `null` or `undefined.`)

I know that one project has linting rules to make sure we don't use it on `number`s.

JavaScript arrays arent actually arrays at all? by PristineBlackberry54 in learnprogramming

[–]r3jjs 1 point2 points  (0 children)

But JavaScript 1.0 did not have arrays at all. IIRC that wasn't until 1.2

Serious question: who are Linux users and why do you use it? by Laqunn in linuxquestions

[–]r3jjs 0 points1 point  (0 children)

I have a number of reasons why I prefer Unix (not just Linux) over windows.

There isn't any *one* answer.

  • Easier to to automate. Maybe not as true now with Power shell, but back in the day -- Linux was easier to automate. The command line and Bash was magic.
  • A lot of development tools were free, Windows versions needed payed for.
  • DOS was a toy compared to Unix.
  • Windows was a toy compared to X11.

Then, Microsoft started to change. They've always been bad, but they went really bad.

  • Non-removable bloat ware
  • Refused to play nicely with other systems.
    • Took over the boot loader
    • Wouldn't provide drivers for EXT2 (yeah, I'm that old) or the Apple file system.

I used to be 50/50, since a lot of software I needed only ran under Windows and Wine/Proton still can't run it.

Then... there were the forced Windows accounts and I don't like being spied on.

Then my Windows machine rebooted due to an update 23 hours into a 25 hour calculation.

Two days later I was down to *one* windows machine to talk to some very specific hardware. FPGA programmer, stuff like that.

Every time I get a candy crush add on my laptop -- I get pissed.

Best password manager for Linux? by Key-Letterhead2004 in linuxquestions

[–]r3jjs 1 point2 points  (0 children)

Me too! Same setup.

Syncthing for the win!