#development

1 messages · Page 85 of 1

nocturne galleon
#

yes for a research app, its not a big deal, which is why i preferred it.

somber dome
#

What's for you the best terminal emulator to do sysadmin stuff, mainly connecting to a stupid amount of different servers (a few thousand) via ssh
On windows and not windows terminal cuz I can't install it

silk eagle
#

A few thousand... and you don't have any management software for it already?

midnight wind
#

Ansible

somber dome
#

I mean not all at once

#

But I always connect to new servers

midnight wind
#

I just use openssh

somber dome
#

That's what I do yeah

midnight wind
#

Built right into windows, as an optional package

somber dome
#

With PowerShell

wind horizon
#

When I'm on windows I use WSL with Windows Terminal, I just set WSL as the default shell to open so when I open Windows Terminal I'm in a Linux env.

upbeat bone
#

When you clean install windows and forget to backup your bots code so you lose everythingKek_You

const dumbass = require("MrGoldenGunz#0001");
if(dumbass) => {
alt + f4
}
plush valley
#

You can even install telnet client through features

hollow basalt
trail remnant
# midnight wind Uhh, you don't do such stuff manually

It's interesting how often newbies ask a question and the answer basically amounts to "That's the wrong question because you asked it because you're already planning to use a solution that's not going to work. Please change your mind or ask a different question."

#

I like helping people, but sometimes I just want to say: "Shhhhh, let them figure this out themselves. It'll be entertaining to watch."

hollow basalt
#

Sometimes, we need go watch them suffer to learn

trail remnant
#

So, I finally caved in and bought the Samsung G9 today.

#

I thought I was getting a really great gaming monitor, but the joke is on me, because now I'm currently preparing to write custom JavaScript to modify Vivaldi's behavior to remove the stupid freaking single pixel at the top of the screen.

#

One pixel might not seem important, but the one pixel border between selecting a tab and resizing the window changes the UX from an infinitely tall button to a microscopically small and frustrating to hit on a large monitor. (The mouse can't move outside the screen, so you can overshoot an infinite amount)

#

It's actually quite telling that his rants about combo boxes are almost exactly how modern web UIs work. (Minus auto-scroll when moving to the bottom. Ubiquitous scroll wheels and touch screens solved that problem.)

supple hull
#

Well, I dumped off my coding challenge for this interview. I'd really like this job so I hope it goes well but regardless of what happens, I'm still gainfully employed.

somber dome
# trail remnant It's interesting how often newbies ask a question and the answer basically amoun...

Well we do use Ansible (with awx) when we want to do things on multiple servers at once, for example to deploy some patches for log4j

But with my everyday tasks I may end up having to connect to maybe 20 different servers at the end of the day. And from day to day those servers are never the same. What I meant to say is that I can't really use profiles such as the one from putty/mobaxterm and such

I think I'll use conemu with openSSh and some maccros that I'll put right into my qmk firmware

It's a bit rude from you to assume people are newbied and phrasing things like you did. But I guess it's my fault because I didn't explain my need clearly at all

#

I'll just make macros that do "ssh user@", "sudo su -" and stuff like that 🤣

#

Speaking of Ansible and UX, we use AWX as a web gui for ansible and, wow, the UX is so bad
And I'm not talking about the numerous bugs i encounter ...

nocturne galleon
#

Gonna present the web app to the client / researcher tomorrow evening! its already 95% done both front and back end, wanted to meet first before tidying shit up + fixing minor issues

cinder idol
#

Anyone able to point me to some examples of displaying and hiding divs in time intervals?

#

I have these 4 divs that i'd like to have an traffic overlay populate over them. after 5-10 minutes

midnight wind
#

change class of a div

cinder idol
#

id imagine something to the effect of```java
if(time % 5000){
document.getElementById('overlayDiv').displayNowOrder

#

very rusty on webdev

hollow basalt
#

Wierd that you have a speicifc 5m time window

cinder idol
#

just arbitrary

#

could be 2 or 10 or whatever

hollow basalt
#

1hr, take it or leave it

silk eagle
#

35 gregorian calendar minutes

cinder idol
#

12 parsects

supple hull
fierce arrow
supple hull
#

Recruiter spam is getting really thirsty. Dude has hit me up four times for some ghost kitchen app start up.

#

I've never replied

wind horizon
silk eagle
#

or backup your project folders to The Internet once a week or so smart

silk eagle
#

just hide them bro

#

1st letter of each line

wind horizon
midnight wind
#

oh lol

#

I read it as "backup your bot codes"

#

yeah use git for source code

#

and a remote server

#

as for secrets I'm looking to deploying hashicorp vault locally

wind horizon
#

You can also use sealed secrets and push them to git then, if you are deploying to some place like k8s and have sealed secrets installed.

But I think both of those prob overly complex for a hobby bot that's not even in git. haha

For something like a hobby bot prob can just toss the creds into you password manager or something. lol

wind horizon
# midnight wind huh never heard of that

You encrypt the keys and then commit them to git, the k8s sealed secrets decrypts them and attaches them like a normal k8s secrets file. If your secrets rotate very often it's not as nice, unless you setup automation to keep updating it. But at that point prob easier to integrate with Vault. But for a lot of normal / avg apps that don't rotate very often it works pretty nice, esp for small teams since by using git it gives you the whole change control process and history for free.

midnight wind
#

anyone here used EdgeDB, seems interesting

hot grotto
#

Anyone here know anything about assembly and can help me with a little project im working on?

#

I need to do a code jump to addon to a mmo that has not been in business since 2011 and is defunctim adding more rows for buffs but client is defeined to L and R rows and i need to add 1 more row C for center in the XUI which i have done already

#

games client exe only has code for 2 rows

#

i need to add 3 rows either through dll file or at the end of the client exe

#

any ideas?

lament bridge
#

I am pretty sure thats scam 😄

devout iris
#

it is

#

dont click it

supple hull
#

Yeah, who's gonna click the random RAR

lament bridge
#

no, I don't I received such the last time and opened in VirtualBox

#

Net errors 😄

#

Anyway, I need some help please.

I am trying to handle somehow the error in case the user has no permission and that part works, but still the line 5-6 is triggered. To explain what I am talking about. is that the Discord Bot should not send that message, if the user turned off DMs on that server. The reason this is important to handle, otherwise it crashes the JS bot.

if(isValidDate(lastMessage.content) == true && lastMessage.content !== '>p predict') {
    //createDBMark(message.author.id)  
    cooldowns.set(message.author.id, Date.now() + cooldownTime); //this will set cooldown for week
    createDBCooldown(message.author.id, Date.now() + cooldownTime);
    message.reply("Prediction sent.")
    message.react(reactSmiley); //react with emoji to the issued commands
    const predictions = ["Prediction 1", "Prediction 2", "Prediction 3", "Prediction 4", "Prediction 5", "Prediction 6", "Prediction 7"]
    const randomprediction = predictions[Math.floor(Math.random() * predictions.length)];
      const prediction1 = new MessageEmbed()
        .setColor('#ff7518')
      .setAuthor({
        name: client.user.username,

        iconURL: client.user.displayAvatarURL()
      })
        .setTitle(reactSmiley + ` Your prediction for this week ` + lastMessage.author.username + `#` + lastMessage.author.discriminator)
      .setDescription(randomprediction);
      
      message.author.send({ embeds: [prediction1] }) // may throw three types of exceptions
      .catch (error => {
        if (error.code == 50007) {
          console.error('Permission issue while sending message to Discord user. (' + message.author.username + "#" + message.author.discriminator + ")");
        }
      })
    ...
  }
supple hull
#

I just had the most surrealist call with a client. It's a meeting of several people and we're doing UX work for them and refactoring their homepage to have a clearer narrative, more pizazz, clear call-to-actions blah blah blah. I got pulled in as they wanted to have us develop it out and it's a wordpress site. I work with a lot of stacks React/React Native, CMSes headless and the classics like Drupal and Wordpress. No biggie.

The lady who's their internal developer was like "Yeah, this is wordpress so it's template based but so much lives in the database". Italics on points of inflections. I was trying to ask about integrations. Turns out total cowboy operation. I think they're using SFTP without any dev environments..... and they want me to hand over the homepage revision in CSS + JS + HTML and not actually create any custom gutenberg blocks or plugins or templates.

lament bridge
#

LOL

#

So you would need to rewrite everything from zero based on the CSS, JS and HTML

supple hull
#

Yep

#

Totally insane

#

So I'll just write up vanilla ES6 + Scss and an assload of notes

#

My operating theory is the developer saw our designs and was like "OH SHIT" and punted it to us so she could see how we did it and copy and paste her way to victory.

#

And she's also protecting her turf.

#

I'm not coming for her job, I'm gainfully employed

lament bridge
#

Do you use framework for CSS or just write yourself?

supple hull
#

I'll use whatever they do which is I think bullshit css

#

Normally I'd just use Bootstrap grids

#

Personally big fan of that as you get the grid system that everyone has seen without all the baggage.

lament bridge
#

Worst kind of customers

  • Not willing to cooperate under any circumstances and/or open to use new things.
  • Insecure
#

😄

supple hull
#
  • know it alls
#

Anyhow, totally insane balls. She did say the "NPMs" so I guess she knows about npm install which is a point in her favor and use the word sass so probably knows just enough to use scss imports.

lament bridge
#

I know about npm install but no idea about scss imports lol

supple hull
#

but it was "NPMs" with the S, which sounds like me when I say "internets" or "PHPs" or "Bootstraps" as a joke.

#

Technically though it does make sense

lament bridge
#

Well the only time I use any npm when I need something, but I don't think I ever used any scss

supple hull
#

Best quote though was "So much of it lives in the database and not the theme".

#

That was when I asked about us integrating our changes into their code base

#

My boss and my technical director and project manager were all slacking each other like "OMG"

lament bridge
#

XD

#

Well that makes sense in case of WordPress

#

I ditched WP long ago

#

I agree for dynamic site it is easy, but whenever its not, fuck it 😄

supple hull
#

I both love/hate wordpress. From an end user standpoint, it's pretty great.

#

From a developer stand point, it's a PHP CMS site so there's all the nonsense you'd have with that world but there's also an incredible amount of community support and even since I started using docker (man, like 7 years ago?) it's taking the pain out of environments.

#

The interesting thing is you'd think 2022 everyone would want custom react apps but nah, Wordpress is still alive and well, if not even more so.

hot grotto
#

i prefer normal php , none of that special crap they do to make it complicated

midnight wind
#

Using wordpress for a client website rn

#

thinking of moving over to using wordpress to generate a static site, as there is like nothing dynamic on that website to speed up perf

supple hull
#

I have this totally dumb setup where I have a jekyll plugin to push changes at the CLI via.... sftp

midnight wind
#

I've been wanting to setup a personal blog, def something static. Maybe hugo? idk

supple hull
#

Wordpress would be an improvement over jekyll as I'd be writing and not writing html

#

I want to try one of those React based static site generators

midnight wind
#

never done anything with react

#

I dislike frontend

supple hull
#

I'm a UX developer so I'm basically front end

#

It's funny though as my blog is HYPER minimalist.

#

I'd really suggest starting the blog in some capacity. I've been at it since 2013 as I figured I should have a visible footprint since I'm not really doing GitHub stuff, nor am I active on LinkedIn and I don't use other social medias.

lament bridge
#

Jimbeamic!

supple hull
#

9 years later, I'm kinda amazed I get about 50k-75k pageviews a month.

#

I only post 2-3 times a month

#

It's all tech stuff, just dumb fixes or how tos

midnight wind
#

been getting into kubernetes, learning some golang now

supple hull
#

It's made me a better writer although discord wouldn't make you think it

midnight wind
#

I have so many things I want to do

#

hard to choose

lament bridge
#

That's life

#

You wanna be this, you wanna do this, but you can't do all

midnight wind
#

yep

lament bridge
#

Except!

#

If you are a reverse engineer. You can reverse time and do something else.

trail remnant
# somber dome Well we do use Ansible (with awx) when we want to do things on multiple servers ...

Asking questions is a skill. You can be an absolutely amazing developer, but have no idea how to ask a good question. That can give a false impression that you're a newbie when you have experience. (Although I'd argue the most important skill any developer has is communication, which is a multiplier on other skill levels. Low communication skills translates to low development skills.) You can also have different skillsets. Just because someone can write an amazing webserver or app doesn't mean they know anything about operations. I'd be a newbie in front-end or app development, but I've got a lot more experience than the average developer does in Ops. The way you phrased your Ops question told me that regardless of how much experience you have as a developer, you're still a newbie when it comes to Ops. The way you asked your question and the information you gave made it very clear that you have very little Ops experience.

Do you want to know how to solve your problem? I'll give you the real answer, but you aren't going to like it: Literally don't waste time on that problem. If you're routinely logging into specific servers, and you have a thousand servers, you're doing something seriously wrong with operations. Ops at scale is different than Ops with a dozen servers. When you scale up to a thousand servers, things should be automated enough and consistent enough that you aren't worrying about logging into specific servers. You should be updating config files and letting your automation take care of rolling restarts. Developers should be using the same process, so there's no unexpected configurations on servers, and there's nothing that can't be handled through automation. Dev or Ops manually doing things is a great way to make mistakes and create unstable configurations that break the rest of your automation. At scale, Ops is automation or bust. Logging into servers is for people with few enough servers that they can count them on their fingers. You asked your question because somewhere along the line, someone at your workplace was inexperienced and made some really bad Ops decisions. (Possibly with contributions from bad management decisions) With a thousand servers, you shouldn't be manually logging into servers often enough to care about being efficient when you use SSH, so the whole question is still the wrong question. Once again, you literally shouldn't be logging into specific servers often enough to have your problem when you're scaling to a thousand servers. I'd love to have a more in-depth discussion about Ops at scale, and all the complexities of scaling, but I've already rambled on enough.

On a more general topic, it's upsetting that so many people interpret my factual statements as value judgements. There's nothing wrong with being a newbie. We were all newbies at one point in time. Why do so many people believe that not knowing things is bad? Not having experience doesn't make you a bad person. It just means you need to spend time learning things you don't know. It's not quite as endemic in our industry as other professions, but programmers can have haughty attitudes and direct at lot of nastiness at less experienced people. It's especially ironic, because our industry has way more ageism than most other industries. The art of being a programmer: "Don't be old, but have a lot of experience." It's sad. Our industry needs more mentors and a bigger focus on teaching if we're going to create a healthy work environment in the long term. Admitting when we're inexperienced and not taking offense when we lack skills is a big part of that.

trail remnant
# supple hull I just had the most surrealist call with a client. It's a meeting of several peo...

I'd call this more "horrifying" than "surreal". It sounds like a complete nightmare. Anyone who talks utters the phrase "it's mostly in the database" is doomed for failure. I had the unfortunate displeasure of working with a set of "dynamic" webpages where every piece of content displayed on the webpages was referenced in the database, by a unique index. It was an interesting experience.

#

Anyways, I think I'm done working on the bad UX "browser doesn't put the tab buttons at the literal top pixel" problem now. I dug deep into the Vivaldi debugging tools, which are awesome, and found that the resize feature is likely being implemented in the window manager code. It's not even in the win32 API, since I modified a few properties like WS_THICKFRAME and although I could stop the window from being resizable, it never removed the interactable resize elements. I maliciously took at hack saw to every single event manager in the Vivaldi rendered window, and none of them disabled the interactable resize border.

Vivaldi uses the chromium engine to render a custom webpage with the browser UI elements. That means you can change almost anything about the UI, if you're technically savvy enough, and don't care about having your customizations break every update. Unfortunately, I think the piece I want to remove isn't part of the webpage UI. The resize border is probably being handled by the underlying custom OS code layer that sets up the window to display the chromium webpage that is the browser UI. That code would be platform specific, and from my work Laptop, I know that the Mac behavior is different than the Windows behavior. That's literally the only piece of the browser UI that I can't change, and it's the only part of the UI that I want to change. thepain

#

For context, on Mac, if you're using tabs on the side of a non-maximized window, even though the OS displays the resize cursor on the window border, you can still click on that window border to select a tab. (Can't use the top on OSx, for obvious reasons)
On Windows, even though you can move the tabs to the very top of a non-maximized window, you can only interact with the resize border, not the actual tabs below your mouse. (See picture)

wind horizon
# supple hull The interesting thing is you'd think 2022 everyone would want custom react apps ...

I think they fit into their distinct categories well, WordPress or similar CMS are some of the best options for regular websites where a company needs to also easily make changes / updates to it. In these cases the website often services more as a information resource or the site features fit well into a standard scope of features, like having users and comments, that have high reusability.

Going with a full custom solution built out with something like React makes the most sense for a web app, something that is usually more feature rich and has lots of business logic. In this case often times the app / site is the product or it fulfills a roles / service in the business.

If you were to take a normal website for a business and build it custom in React with something like Node BE it'd prob cost nearly 10-100x the cost of WordPress. lol

wind horizon
next cipher
#

it's wasted probably hundreds of hours of my time over the last 6 months and therefore probably tens of thousands of my employer's dollars

#

i can't complain too much about getting paid but ... it's not exactly intellectually stimulating

hollow basalt
#

Stimulate it yourself

plush valley
#

It's amazing how much you can now customize

#

Basically every element of an application can be modified to look different now

next cipher
lament bridge
lament bridge
#

If there is a JSON in a certain SQL table, can I filter for speci values? (In SQL syntax)

EG: and I am looking for the value of Name and Version.

{
    "arch": "x86_64",
    "name": "Debian",
    "version": "9.9",
    "version_major": "9",
    "version_minor": "9",
    "family": "deb",
}
cinder idol
#

unsure if anyone has used cloud9 from aws before but I have a 10g space but it looks like nearly all of it is used up

#

and i just made it

#

anyone know a way to reduce whatever dev/xvda1 is?

hollow basalt
#

did you built your project and/or installed your depedencies

cinder idol
#

I just created a new instance/environment whatever aws put in there by default is there

hollow basalt
#

linux

cinder idol
#

yep

hollow basalt
#

yep

cinder idol
#

I'm gonna try resizing from 10-20 gb and see what happens

hollow basalt
#

increasing the size

cinder idol
#

ayy it worked this time

hollow basalt
#

yes

cinder idol
#

but im still alarmed at the 8.1gb of used space. No idea what is there or how to clean that

hollow basalt
#

linux

cinder idol
#

oh do you mean thats the actual operating system?

hollow basalt
#

it's still a vm somewhere

#

it's not running on unicorn powder

cinder idol
#

ohhhhhh

#

I just assumed the 10gb of space didnt count toward the os

#

so that makes sense now

hollow basalt
#

i'll need to search if they put it somewhere deep in the documentation which they do sometimes

trail remnant
# plush valley https://docs.microsoft.com/en-us/windows/apps/develop/title-bar?tabs=winui3#titl...

This is pretty cool, that they give developers the ability to customize everything, but they also have a clear design language to help developers fit their apps into the standard OS format. Except for the part where apparently no one read the documentation and actually did it. Check the official docs, where they say the window title bar should change color when the app is focused. Except Discord, Spotify, and Vivaldi all don't do that. Steam changes the color of the interactable text, but it's so subtle that it's almost impossible to notice unless you're paying attention to it. I guess this explains why I've ended up focused on the wrong app a lot more in the last few years than I did when I started using the computer.

plush valley
fierce arrow
#

I find that the tabs on the brave browser are pretty thin

plush valley
#

The MS Docs are basically the BEST

#

Out of everything ive ever seen

trail remnant
#

Unfortunately, the Windows docs, while impressive, only highlight that this problem is well above my pay grade. The docs say:

Write custom code to calculate and set drag rectangles, including when the window size changes.
Which is exactly my problem. The custom code is not part of the user-editable Vivaldi UI. The custom code is part of the internal Windows rendering code, and outside of bithacking the binary, I don't have access to that code.

#

But yeah, MD Docs outshine everything else. It's why I prefer to use the Microsoft option if it's widely available. The time I save by having high quality documentation is worth any other complaints I've found.

#

(But, use your brain when picking a technology. Even if I think PowerShell is objectively better than Bash, you'd be wrong to pick PowerShell for automating Linux server tasks, and there are lots of failed MS technologies like Silverlight, that never really got off the ground. Don't ever blindly pick a technology.)

fierce arrow
#

Does anyone know an alternative to MinGW ? the installer has been broken for a while and I need it so I can run C in visual studio code

fierce arrow
#

How do I install them?

#

My professor told us to just install MinGW and it does it for us

midnight wind
fierce arrow
#

Oh ok thanks

midnight wind
#

It's basically Linux on windows

#

Then you install gcc and use it to build

fierce arrow
#

Could I run it on a virtual machine?

#

I already use VMware

midnight wind
#

But wsl is better

#

It's Linux but you can easily use it on window's file system

nocturne galleon
#

wsl (2)

hollow basalt
#

wsl (3)

wind horizon
#

wsl (4)

trail remnant
#

It's odd, because I'd typically recommend Docker for Windows over WSL.

#

However, the last time I seriously investigated WSL vs Docker was at least two years ago in a super locked down corporate environment, so I'd trust the everyone else in this case.

hollow basalt
trail remnant
#

Both running on an internal VM?

hollow basalt
#

clarification WSL 2

#

wsl 1 is a different implementation

#

but yeah. wsl2 and docker in hyper-v vm

#

so....

#

you could make docker container act like WSL

#

i think the advantage is if you have tons of docker containers, atleast they share

fierce arrow
#

I just spent a long time individually typing out states alphabetically for a drop down list in html and my friend just told me you can literally find a premade list online

midnight wind
#

Bruh

hollow basalt
#

Bruh

silk eagle
#

you can find a list of anything online

#

just put "github gist" at the end of your search

#

or "raw text"

hollow basalt
#

🤔

silk eagle
# hollow basalt

this is a good representation of bing being better for tech searches than google

hollow basalt
#

how is that better

silk eagle
#

bro it gives u things

hollow basalt
#

that's a bad argument

silk eagle
#

search a problem on google and bing, bing will give more stackoverflow stuff

#

boom problem solved gotta use x86 literally 5 seconds

wind horizon
# trail remnant However, the last time I seriously investigated WSL vs Docker was at least two y...

TL;DR for my long post: WSL 2 is great, WSL 2 + Docker desktop is awesome, and WSL 2 + Docker Desktop + vscode wsl extension is amazing. 😆

Docker desktop + WSL 2 is a great Windows dev setup. Check some of the great benefits of running your docker with WSL 2: https://docs.docker.com/desktop/windows/wsl/

Pretty much Docker default relies on Hyper-V to spin up VMs and is a bit slow, if you use WSL 2 integration it runs the containers inside the managed VM for WSL 2 and is very fast.

Going from plain docker on Windows to docker in WSL 2 is actually really noticeable with speed and you get native control over docker inside WSL. So you can run things like docker compose scripts inside WSL shell. Connect something like vscode to WSL using the wsl extension and you have awesome setup where your GUI is Windows but your dev env is Linux. Getting the best of both world.

If you want to see the whole break down MS has a good post here: https://docs.microsoft.com/en-us/windows/wsl/compare-versions

TL;DR for the MS doc above:

  • Much faster - claim up to 20x faster IO
  • Full Linux kernel provided by MS (patched by Windows update)
  • Uses a fully managed VM
  • Still has that easy to access / mounted Windows file system, so you can get to your Windows files. Although accessing files on Windows or Windows accessing files on WSL is a tad slower now in WSL 2 due to the more isolated nature of the VM, however I don't think it was ever meant to be used extensively and more so as a convenience.
midnight wind
#

Bruh, this C++ class teacher is saying

using namespace std;``` is the same "sentence" which is why you don't need a semicolon after the include 🤦
hollow basalt
#

sentence
dead

silk eagle
#

sentence linuth python doesnt require semicolons bro (implication here is that python = english)

#

and sentences end with periods

topaz flare
#

I have yet to find a good use case to use for WSL for cloud dev, I need an excuse to use it ):

next cipher
#

get a refund

midnight wind
topaz flare
#

not too bad then

silk eagle
#

you correct them and they'll say "Do you have a degree????"

#

I wish that I had multiple degrees in HS so i could be like 😏 why yes I do

topaz flare
#

those who validate one's skills based on whether or not they have a degree are usually losers from what I've observed. I'm talking about those who use "I have a degree in x so..." or "do you have a degree in this field?" for any argument or challenge.

silk eagle
#

id be more intimidated by 10 years real-world experience than 10 years of getting a PhD (except for physical sciences n whatnot, like physics, medicine, etc)

topaz flare
#

My employer historically hired only from the top business and tech schools in each country they do business in. But with modern tech, they have failed several times in the past several years, so the focus has shifted to hiring based on skillsets and ability to deliver.

plush valley
topaz flare
#

Academia is 5-10 years behind us tech-wise, so the downside with hiring from top schools is that the students are solely focused on their schoolwork and do not explore outside technologies...usually. The talent pool is so small for what we do, and I would say more often than not, individuals with the skill set we are looking for do not have degrees

upbeat fiber
#

not me who has tried to setup whmcs for the past 2 hours and still failed 😦

topaz flare
#

aye its all part of the learning process

upbeat fiber
#
 
bot.channels.cache.get(botConfig.ticketkanaal)
  .bulkDelete(1)
//--------------------------
    var rating = Math.floor(Math.random() * 100) + 1;
  const embed1 = new discord.MessageEmbed()
  .setColor(botConfig.color)
  .setDescription("System starting....")

  bot.channels.cache.get(botConfig.ticketkanaal)
  .send(embed1).then(msg=>

    setInterval(function() {
            var embedMessageee3e = new Discord.MessageEmbed()
                .setColor(botConfig.color)
                .setTitle("Ticket Systeem")
                .setDescription("\nWil je een ticket openen?\nKlik dan op de **(:tickets:)** emoji hieronder!\n\n**LET OP:** Denk na over je vraag voordat je een ticket opent.")
                .setThumbnail(botConfig.thumbnail)
                .setFooter(botConfig.footer, botConfig.thumbnail).setTimestamp()
            message.channel.send(embedMessageee3e).then(message => {
                message.react(":tickets:")
            })
        }
    }
})

bot.on("messageReactionAdd", async (reaction, member) => {
    if (member.bot) return;
        if (reaction.emoji.name == ":tickets:") {
            if (reaction.message.embeds[0]) {
            if (reaction.message.embeds[0].title == "Ticket Systeem") {
                return openTicketReaction(member, "ticket", reaction)
        }
        }
    }

Sombody help? it doesnt run idk why

upbeat fiber
#
SyntaxError: missing ) after argument list
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1026:15)
    at Module._compile (node:internal/modules/cjs/loader:1061:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47
Node.js v17.5.0
midnight wind
#

missing )

#

read your errors before asking for help

hollow basalt
#

i wonder why these devs put error messages if nobody would read them

upbeat fiber
#

me2

#

its just fills space

wind horizon
#

If you use an IDE it'll likely give you errors for missing syntax like that before you run the code. 👍

upbeat fiber
#

OMFG

SyntaxError: Unexpected token ')'
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1026:15)
    at Module._compile (node:internal/modules/cjs/loader:1061:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47
#

imma about to punch my monitor

hollow basalt
upbeat fiber
#

now its saying unexpected

midnight wind
#

wrong place then

hollow basalt
upbeat fiber
#

it was the only logical place

hollow basalt
#

for you yes, but node disagrees

midnight wind
#

also

#

different callback styles..

wind horizon
#

Here is your issue spot, see how much an IDE can help hint you to the right spot visually. lol

midnight wind
#

so much indentation tho

hollow basalt
#

callback hell it is

wind horizon
#

You can see where your curly brace is associated with the anon function you wrote, but then you got 2 other closing ones and what are they for? Maybe you used to have a block for the function, but then changed it to implicit return later and that's how you got the issue?

#

Notice how your arrow function in the .then is implicit return (no curly brace), so there is nothing to close there.

midnight wind
upbeat fiber
#

im so confued

midnight wind
#

avoided callback hell

hollow basalt
#

but i like promises

wind horizon
#

async/await still uses promises

midnight wind
upbeat fiber
#

that should execute that

hollow basalt
midnight wind
hollow basalt
#

return a new promise when a promise returns, beautiful

midnight wind
#

so you have to figure out your () and {} at the end

upbeat fiber
#

i dont udnerstand shit about Javascript

#

lmao

#

it confuesed me more and more

hollow basalt
#

() {} is not js exclusive

upbeat fiber
#

i know

#

but espacially in JS it confuses me

wind horizon
#

Hmm best thing I can suggest is stop trying to write this bot and maybe go do some basic JS videos?

midnight wind
hollow basalt
#

the easiest excuse is to blame the language

midnight wind
#

perhaps promises but callbacks still exist in most languages

hollow basalt
hollow basalt
#

are you sure

upbeat fiber
#

but im not great in it

wind horizon
#

I mean go for it, but if you are struggling with basic stuff like closure I think even just 1 day on some basic videos could help you a lot. You don't need to become a pro, but just a few videos can really help a lot and reduce your frustration.

hollow basalt
#

you don't need to become a pro, you just need to learn to read

upbeat fiber
#

omg

#

i think i just fking found it

slate frigate
#

You know, a good IDE solves closure problems

wind horizon
#

So I don't know the rest of you code, so can't answer that but your closure issue is that you need to remove those extra } braces and then close the ) out.

Like this:

bot.channels.cache
  .get(botConfig.ticketkanaal)
  .send(embed1)
  .then((msg) =>
    setInterval(() => {
      var embedMessageee3e = new Discord.MessageEmbed()
        .setColor(botConfig.color)
        .setTitle("Ticket Systeem")
        .setDescription(
          "\nWil je een ticket openen?\nKlik dan op de **(:tickets:)** emoji hieronder!\n\n**LET OP:** Denk na over je vraag voordat je een ticket opent."
        )
        .setThumbnail(botConfig.thumbnail)
        .setFooter(botConfig.footer, botConfig.thumbnail)
        .setTimestamp();
      message.channel.send(embedMessageee3e).then((message) => {
        message.react(":tickets:");
      });
    })
  );

hollow basalt
#
bot.channels.cache
  .get(botConfig.ticketkanaal)
  .send(embed1)
  .then((msg) =>
    setInterval(() => {
      var embedMessageee3e = new Discord.MessageEmbed()
        .setColor(botConfig.color)
        .setTitle("Javascript tutorial")
        .setDescription(
          "You should watch basic javascript videos like glamdring said"
        )
        .setThumbnail(botConfig.thumbnail)
        .setFooter(botConfig.footer, botConfig.thumbnail)
        .setTimestamp();
      message.channel.send(embedMessageee3e).then((message) => {
        message.react(":thumbsup:");
      });
    })
  );
wind horizon
#

However why we have an implicit return of a set interval that is never assigned to variable for the interval id, that I have no idea. 😆

upbeat fiber
midnight wind
#

why

hollow basalt
#

why

midnight wind
#

that's like, bruh

#

use a local dev environment

upbeat fiber
#

cuz im to lazy to download the whole bot and put it on my localhost

midnight wind
#

or like vscode to a remote server works too

slate frigate
#

Yeah, like I said. A good IDE.

wind horizon
#

Never even heard of pterodactyl lol

midnight wind
wind horizon
#

oh...

upbeat fiber
midnight wind
#

yeah it doesn't have a language server

#

so it can't tell you syntax errors

wind horizon
#

Well if it doesn't catch something as basic as closure issues I wouldn't use it, sounds more like just an editor with syntax highlighting / color support. lol

upbeat fiber
#

someone should program it as a addon tbh

slate frigate
#

Uuuuuugh, i just looked up pterodactyl's technology stack. They dirty up my beautiful golang with dirty php

plush valley
hollow basalt
midnight wind
#

@slate frigate also, been learning a bit of golang for this project I'm doing. How do you deal with all the

if err != nil{
  //whatever error handeling
}```
upbeat fiber
#

cause im hosting my DC Bot by Newbienode

midnight wind
#

why I just use a VPS usually

plush valley
wind horizon
#

What is newbiewnode. lol

upbeat fiber
hollow basalt
#

expensiver
a what

midnight wind
upbeat fiber
#

i pay like 75 cents a month

wind horizon
#

I host my bot for free on GCP Cloud Functions 😛

upbeat fiber
#

for my hosting

midnight wind
wind horizon
#

First 2 million calls per month are free.

hollow basalt
upbeat fiber
#

oh

hollow basalt
plush valley
#

GCP
eww

wind horizon
wind horizon
hollow basalt
#

I use AWS, the functions are free but for it to be actually usable. need to pay for API gateway for example

slate frigate
plush valley
#

I use AWS over everything personally but thats just me

wind horizon
hollow basalt
slate frigate
#

Linode best node!

hollow basalt
wind horizon
#

I have code on both, use the free tier from them each. Like a cloud pirate getting free compute everywhere I can. 🏴‍☠️ 😆

midnight wind
#

OVH..

plush valley
#

Digitalocean

plush valley
midnight wind
hollow basalt
#

i have AWS, AZURE, LINODE

#

what else do i need

plush valley
#

I have AWS, Azure, Colocated Machines, The ones in my House, annnnnd thats it for me.

wind horizon
hollow basalt
#

you have Rouing CLoud

hollow basalt
plush valley
#

Google App Engine

hollow basalt
#

boooo

slate frigate
#

I also like linode's api. It was pretty simple for me to write some automation for some stuff

plush valley
hollow basalt
wind horizon
# hollow basalt i don't know GCP, how could you use functions for a webapp though? what service ...

They execute some code, so you can have them do almost anything. For example you can create REST end points and deploy them to Cloud Functions and have them handle all your API calls.

With the Discord bot for LTT store I have one that runs every 5 minutes, grabs the old store state from GCP storage bucket, compares the data, pushes messages to Discord, then saves the new store state.

For an normal web app you may connect to DB and do something on a webhook etc.

plush valley
wind horizon
#

Usually though I'd scale a app on App Engine or Cloud Run and then use Cloud Functions for more so processing specific events off a pub/sub or some special use case web hooks.

hollow basalt
wind horizon
#

unless it was big and complex, then k8s I guess lol

hollow basalt
#

probably stick to aws myself

wind horizon
#

They are super similar

plush valley
#

No idea personally

upbeat fiber
#

//------------------------------
    if (message.content.toLowerCase().startsWith("!reactionticket")) {
        var botAvatar = bot.user.displayAvatarURL()
        if (message.member.roles.cache.has(botConfig.ticketRole)) {
            message.delete()
            var embedMessageee3e = new Discord.MessageEmbed()
                .setColor(botConfig.color)
                .setTitle("Ticket Systeem")
                .setDescription("\nWil je een ticket openen?\nKlik dan op de **(🎟️)** emoji hieronder!\n\n**LET OP:** Denk na over je vraag voordat je een ticket opent.")
                .setThumbnail(botConfig.thumbnail)
                .setFooter(botConfig.footer, botConfig.thumbnail).setTimestamp()
            message.channel.send(embedMessageee3e).then(message => {
                message.react("🎟️")
            })
        }
    }
})

bot.on("messageReactionAdd", async (reaction, member) => {
    if (member.bot) return;
        if (reaction.emoji.name == "🎟️") {
            if (reaction.message.embeds[0]) {
            if (reaction.message.embeds[0].title == "Ticket Systeem") {
                return openTicketReaction(member, "ticket", reaction)
        }
        }
    }
#

fixed it

wind horizon
#

Huh warship didn't like something I said lol

midnight wind
#

like usual

upbeat fiber
wind horizon
#

No

#

I was explaining Cloud Run, but it deleted my message lol

upbeat fiber
#

ah

hollow basalt
wind horizon
#

Cloud run scales your your container based on a trigger such as http. So no traffic it's 0, request comes it spins up the container and scales up for more traffic as needed.

#

Unless it has changed cloud run used to have time limit on how long it can run, it's meant to focus more on micro services and such.

#

Cloud Run can feel a lot like a container version of Cloud Functions in a sense I guess.

#

I haven't used it much though, only a little year ago when old company was considering it. We ended up not using it and just stick with putting the app in our existing k8s cluster.

slate frigate
#

@wind horizon you'd have to keep up consistent usage, or else initial access time would suck

hollow basalt
#

keeping it hot

wind horizon
#

Most cold starts are not an issue these days, but it used to be an issue with things couple years ago.

#

If you have insanely sensitive response times then it could still be an issue.. Not sure if Cloud Run lets you set an always active min. App Engine used to let you do that, you could set 1 always active instance for example, so it'd never scale to 0 but could still scale up.

topaz flare
#

Or can always set a trigger to warm 🤷‍♂️

#

We built an ELMA solution utilizing serverless services and it processes over 50TB of data a day using functions

wind horizon
#

Yeah and lot of functions now take under 300ms to warm, so really for most uses cases it's fine. Since if it's actively used it'll be warm and maybe just go cold at night and warm again in the AM.

topaz flare
#

Yeah and if there’s a timeout for some reason there’s always retries

wind horizon
#

Yup and so long as you are aware of that possible warm time you can just make the judgment call if it's a deal breaker and work around it. But I think for many uses cases it no longer is.

#

Serverless functions triggered by pub/sub in response to events like file uploads and such is such an amazing use case for it.

topaz flare
#

Our clients are global 100 and gov/financial and even they can accept the warm up times

#

Cold start…whatever

wind horizon
#

Few years ago I worked on a system that clients sent files in SFTP, so we piped those into bucket storage and then when event was published for new file it'd kick off a function to process the CSV and insert the data into the DB.

#

Funny thing was we were processing prob about a TB or so per a month, so not insane data but still a lot. It hardly cost anything, it was under the 2M invocation free tier, but we had to pay a little for the run time. But still was cheaper than running a full time instance and it could scale up when big batches came in instead of getting backlogged.

topaz flare
#

We did this solution where we had an object store, sort the data and throw it into a new bucket, then that had a trigger to another function that transformed the data according to config “objects “ in our non relational DB, then used AWS glue and Athena to allow queries of the data, and then used various visualization tools to visualize the data

#

Was like 1/20th the cost of something like splunk

wind horizon
#

I have to work with splunk today and not a big fan. haha

topaz flare
#

Serverless is where it’s at, unless you need an app to run 24/7 and it’s legacy software

#

It’s so easy to go past limits, and nobody knows how to manage it

#

We have done well architected reviews and every time it seems, the client uses splunk and hates it

wind horizon
#

We have the enterprise one where our ops team manages it, runs in the cloud still just not the hosted version by Splunk. So we have no "limits" in place on us, but as it is they can't retain all the data we need due to costs still, idk how pricing works wonder if maybe issue is too much data = more instances / license needed. 🤷‍♂️

#

Also the interface is just annoying

#

lol

#

Also their APM is eh, I liked DataDog and New Relic APM a lot more.

I mean traces work fine in Splunk, but the UI / interface for following them is just not that well done.

topaz flare
#

We enjoy datadog and dynatrace

#

And a lot of these tools work well with pipelines, splunk can be iffy

#

Do you use terraform much?

wind horizon
#

Not now, but did at my old job.

trail remnant
true path
#

Possibly anyone on here with CSS knowledge?

#

Nevermind, figured it out myself

trail remnant
#

lol

wind horizon
#

Just to mess with people you should use a class name that is very misleading.

.visible {
  display: none;
}
silk eagle
#

to make it a more subtle troll, you can name it visibility

trail remnant
#

Why do you hate humanity?

#

I mean, I'm laughing, but that's horrible.

wind horizon
#

I bet you like 80% chance I can get it through the PR review without someone noticing, just need to have enough other code changes there to act like noise.

So many ppl hate CSS and hardly even look at CSS in PRs. 😆

#

I won't really merge it, but I'm going todo it for fun. If I get approvals than I'll point it out for a laugh and push a change fixing it. lol

trail remnant
#

Make sure to push the change with the next PR, so it looks like you made a silly mistake and caught it later.

#

If you make the change in the same PR, it looks maybe a bit more suspicious?

fierce arrow
#

Anyone here with experience, what Linux distro's are most commonly used?

#

Probably the wrong channel to ask

cloud knot
#

(RHEL includes CentOS in my mind)

trail remnant
#

For Docker, alpine Linux is pretty popular. It's a slimmed down distro great for saving on space. Usually the other Docker preferred distro are Ubuntu and Debian.

#

Arch Linux is not exactly newbie friendly, but it's the base for a lot of other distros.

lament bridge
silk eagle
#

might be that in if checkuser(message.author.id) == message.author.id , checkuser(message.author.id) is returning a string or something

wind horizon
# lament bridge I have a code here that supposed to only work if the user is not in the database...

if (checkuser(message.author.id) == message.author.id ) {

In your code checkuser is returning a promise, this is an async call so your if statement is just seeing a promise not the actual response. You could promise chain it, but in this case an async function is prob best.

client.on("messageCreate", async message => {
  if (message.author.bot) return;
 
  if (message.content.indexOf(config.prefix) !== 0) return;
  const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
  const command = args.shift().toLowerCase();
 
  if(command === 'predict') {
    //const cooldown = cooldowns.get(message.author.id); // this will check the local cooldown
    //console.log(cooldown) 
    //const dbcooldown = getDBCooldown(message.author.id)
    const user = await checkuser(message.author.id)
    if (user == message.author.id ) {

Notice adding async and await lines so the code will pause and wait until the promise is resolved.

As for the actual response I can't see / validate that, but you should be able to debug it properly now that you are waiting for the promise to resolve. 👍

ornate crown
ornate crown
wind horizon
nocturne galleon
#

Last night It took me way too long to figure out why we only need to check up to the square root when checking primes maybe I was just too tired

#

I mean it's modertly confusing but still thonk

supple hull
#

jfc, I did a take home code test for a company and they said 3-4 hours so I took that a bit too literally. Basic thing was take a dummy project (wordpress) and hit an API end point, and display the data on the screen like their Figma mockup, and use localStore. Super super open ended.

I had a hell of a time getting it to work since their docker-compose was a bit screwed so I fixed that to work on my Apple Silicon box which adds a bit more complexity, noted what I did. Then they said use any frameworks, so I used Bootstrap grids and said "I did this for time, I can write my own grids" then I got docked for that. They didn't like how I used a global var state for a curl command to hit an API end point and had some issue compiling the JS (which was interesting as I didn't have that oh well, probably my bad).

#

Oh and I had to write tests in Cypress too

nocturne galleon
#

Just send two versions then they would make you CEO

#

How to do it in 4 hours and how to do it another way

supple hull
#

I've been at the same job for seven years and wasn't looking but their internal recruiter really took the time to reach out (going to personal website from linked in and referencing my profile etc) so I'm a bit out of practice on these.

supple hull
#

The odd thing is I'm a UX developer. I said "I am not a PHP guy. I can do Python and PHP but don't expect amazing work from me" in the interviews leading up to the code challenge. They were like "Oh we want someone to work as a bridge between design and development". That is exactly what i do now and I like doing.

#

Then I got docked for how I wrote PHP 🙂

nocturne galleon
#

That's weird a lot of these types of questions can be seen as a sort of red flag for that company anyway

supple hull
#

Everything before that was fairly good as far as the interactions go, better than most. I assume though they have their standard level of dev stuff they want out of the way. I stupidly took them at face value wanting to see what I could really do in 3-4 hours (I spent extra time of course but not egregiously) but I'm guessing most people are like "Sure 3-4 hours" and spend 12.

#

Lesson learned.

#

Upside, still gainfully employed.

wind horizon
supple hull
#

I've never gotten a job via a recruiter

#

I usually ignore them

#

Mostly I'm bummed about that fat paycheck lol

#

Not bummed about having to take on more Wordpress

#

In any case, I feel like that was a good refresher on hiring practices. I don't think I embarrassed myself and I did like they gave me real feedback. Although, c'mon, telling me I can use any framework then dinging me for using bootstrap grids (not even full bootstrap) was annoying or telling that I stashed a curl in a global var that wasn't super clear? Oh well. This is me working for agency where I'm always thinking about getting shit done over the best engineered solution.

wind horizon
#

Yeah that sucks, are you US based? Based on your described skill set idk of something off top of my head but can keep an eye out / ask around if anyone knows of good jobs.

supple hull
#

Yep, stateside, not really hurting as I have a pretty good job. Just doesn't pay the best.

#

I appreciate the offer but I'm alright

#

I just liked the idea of being able to pay off my remaining college debt in a few short months if I wanted to

wind horizon
#

Yup I saved up enough during covid to pay them off finally, just waiting to see what they do / when they resume before I make the payment.

#

Still not enough to pay off my wife's too, but it's a start. Lol

supple hull
#

I could clean my bank account out and have a few grand left over as is, just seems like a bad move

#

Oh man, my girlfriend has law school debt.

#

She makes good money but that law school debt is serious business

#

Like my college debt supremely manageable, I have like 1/10th of hers, maybe less

wind horizon
#

Oh nice, yeah any grad school stuff is expensive

supple hull
#

Also, just dropped about $5k the past few months fixing up garage into an office.

wind horizon
#

Combined we have like 50-60k left, think it originally was just shy of 80k. Been a long slow process to pay down.

supple hull
#

I paid to have the drywall done but holy hell, everything got EXPENSIVE, I think I paid a few hundred on copper wiring alone.

wind horizon
#

Wow

supple hull
#

Yeah, but also ran 240 to the garage.

wind horizon
#

Oh nice

supple hull
#

Idea is this place could become two rentals if things get serious with my girlfriend and I because of Portland's ADU (additional dwelling unit) stuff. Bascially the garage meets the requirements for an ADU so far. I had to buy R15 insulation and we had to give it's own panel box etc.

#

A lot of stuff to follow but my office is gonna be nice. Right now it's either working from my GF's kitchen or my brother's old cidery building. The later is more ideal but it's also a long ways away, which is where most of my stuff is.

#

So it'll be nice to have a proper work space. I feel like then and after I cash out a lot of vacation time I should actually get serious about job stuff

wind horizon
#

Oh yeah working in a kitchen and stuff is fun for remote travel, but kinda sucks for every day. Haha

#

One positive is some places will give you remote budget for your setup. Unfortunately not all places. My old job I got like $1k + internet every year.

Friend at FB think he said he gets $5k + some other benefits for remote.

My new job pays me more, but they don't give me cash to just spend. Instead they ship me monitors and such. Which is a shame since I have those, old job would let me expense desk, coffee machine, etc. 😅

But guess in the end they are just giving me the cash to do what I want with, so that's probably better still.

supple hull
#

The place I interviewed for gave you remote budget. My company gives a tiny bit. I’m going to use it to buy a good chair since mine sucks. It was good but it survived college.

wind horizon
#

Nice, yeah interviewing after not for so long is rough though. Last time I decided to change jobs I felt like first 2-3 I did okay but wasn't on my game. I made it to final rounds in all but 1, but it still felt a little rough until I got used to it again.

I know there are interview prep services, but that always seemed silly to me. When I interview devs I like to see them being honest and I never ding them for not knowing something. What I ding them the most for is talking in circles / clearly fibbing through it. I want someone who is honest and quick to acknowledge they don't know how to do something, but also will give it their best shot and see what those problem solving skills look like.

supple hull
#

That's been my opinion, our company is small so I sit in on interviews and mostly I'm looking for: Is this person an asshole? Will the screw me over by incompetence? Are they willing to demonstrate they're flexible about learning? I've had a few people lie and its always so obvious that its not worth the risk. I'm surprised it comes up.

#

I'm not a big fan of gotcha questions or putting someone on the spot or having them code in front of me so much I am seeing evidence of what they're capable of doing.

#

Awhile back we'd moved to coding exercises, we had one that was like series based on a language that you could rewatch someone code in real time which I still felt like was a bit more under the gun than I cared for.What the company game me this go around honestly was closer to what I prefer but I boned up apparently on what their criteria was so fair enough. Didn't get it.

wind horizon
# supple hull Awhile back we'd moved to coding exercises, we had one that was like series base...

I know some people that have been offered live pairing session or larger take home. I like that idea of giving the person a choice.

My 2nd dev job I remeber I was given an option to provide my own repo / code or use one of their pre-made ones with a link to them. That was super cool since you could come into the interview feeling comfortable in the code, but then they'd give you some challenges to refractor or add a feature.

supple hull
#

They wanted to do four hours of paired programming

wind horizon
# supple hull They wanted to do _four hours_ of paired programming

Yeah this job I had 3hrs paired and 1hr manager / verbal. However it was 3 ppl all diff questions.

The worst I had was early in my career I had a 6hr long on site process. It was pretty awesome though and I got offered a Sr role only 2 years into my career making 6 figures.

I ended up turning it down though for a 100% remote role that wasn't too much less money and ever since I have only worked remote jobs. Haha

#

Interviews for devs can be pretty rough, I guess it's the trade off for our nice salary and benefits. 😅

But I feel like interviews are getting worse these days with how hyped leetcode is. Last time I switched jobs 2 out of the 5 interviews I did had ago questions and 0 questions related to web stack. I'm like uh if I pass the algo and don't even know a thing about say REST and you offer me a Sr/Staff role for a web app how is this going to work out.😅

#

In your case sounds like they just did a poor job communicating expectations.

#

I have always said interviewees should know what they are doing in the interview and if any tools what they will be. For example sending a test env in the shared coding tool used for pairing so they can get comfortable in the web IDE.

marsh stream
#

Javascript programming language
Interview with a Javascript developer in 2022 with Jack Borrough - aired on © 2022 The Javascript.

Find more Javascript opinions under:
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-
d3a717dd577f

Programmer humor
Javascript humor
Programming jokes
Programming memes
Javascript 2022
Js memes
js j...

▶ Play video
safe forge
#

question: how do i limit inputs in php?

#

this is for name variable. how could I modify so that it only accepts inputs of numbers, and it has to be between 9-13?

#

this is what i adjusted it to, but im not sure how to limit the top and bottom band

#

do i need to use if statements?

nocturne galleon
#

oh shit

#

someone also shared it above

#

@marsh stream haha!

#

I just watched this

#

fuckin hell, hilarious!

hollow basalt
#

anyone else, want to repost it?

hollow basalt
trail remnant
#

I had a similar thought this morning. Software development is hard for a lot of reasons, but the reason a lot of companies fail is because of bad management.

#

There are people alive right now who were born before computers existed. The software development industry is super new. Software as a separate thing from hardware really only existed since the 70s, which is only 50 years for an entire industry to develop. There's just not enough skilled managers in our industry, and not enough broader knowledge in the business world to effectively work with software devs. We need millions of skilled technical managers, and we have thousands. We need tens of thousands skilled executives who know how to start a three person company and scale it to a successful medium sized company, and we only have dozens of people with that skillset/experience.

cloud knot
# safe forge

i would recommend using frameworks which usually have this kind of stuff built in; but i would recommend simply converting it to number ? So get the string input value, possibly use your number regex, then run it through https://www.php.net/manual/en/function.intval.php, then use simple math operators ?

safe forge
#

i solved

#

its all good

wind horizon
# nocturne galleon https://www.youtube.com/watch?v=Uo3cL4nrGOk

The back and forth humor is funny / captures JS world. But could have been done way better, too often he says things that don't make sense. For example saying promise came out, then we went to async await, and then back to promises.

Async functions are promises. 😅

supple hull
native granite
#

Is there a way to stop the background from changing color when the <select> menu is down?

wind horizon
native granite
#

Hm, I'll try that tomorrow, thanks :)

nocturne galleon
#

Web app of client finally deployed

#

fucking finally

silk eagle
#

💪

nocturne galleon
#

So as it turns out, me and my colleague finished the client project just in time for the start of our 2nd semester. and It has the subject, CMSC 100 - Web Development, which, in our case, we already have ample knowledge to speedrun the course KEKW

#

Because of the project, learnt so much over the course of the month

nocturne galleon
midnight wind
silk eagle
spark geode
#

should I learn spring boot now or wait for version 3 to be released?

trail remnant
#

My opinion: If the next version of a thing isn't out, you shouldn't wait to learn until it does come out. Good educational materials take years to develop, and the first guides will be written assuming you're transitioning from the previous version.

nocturne galleon
# spark geode should I learn spring boot now or wait for version 3 to be released?

(warning, this is my opinion, if you disagree with it, that's fine) if you want to learn it at all, i agree with pickle, though from looking at the code someone i know who uses spring always sends, it just looks like a lot of overengineering, i don't see a point in using it unless you have a very specific use case where it would help

hollow basalt
#

these kind of enterprise libraries won't break their stuff

trail remnant
#

I guess "overengineering" depends on how that person is using Spring. There's a super old version where half your application is in huge XML configuration files, which is just a mess. Just don't use the old versions of Spring. But the newer version uses annotations like @autowired to automatically build and select appropriate instances of things like loggers or controllers so you can focus on writing independent components without worrying about managing dependency chains or initializing things. That's pretty nice. Lots of things like performance monitors can be completely automated just by including the spring-boot-actuator dependency in your pom.xml. (Using Maven, but I'm sure you can do the same with Gradle)

Those features are really nice when you're setting up a simple web service. Using spring-boot-starter-web makes the initial setup way easier, to the point where it almost feels like writing a webserver in a simpler language like Python.

hollow basalt
#

yea, don't use "spring" use "spring boot"

#

much easier

#

and more sane

trail remnant
#

Like, here's an example from a simple webserver project using the Spring Boot web starter.

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

Throw this in your pom.xml file, which includes everything you need to just get started writing a simple web server. Then you can write this kind of code that's simple and easy to understand:

@RestController
public class GenericEntityController {
    private List<GenericEntity> entityList = new ArrayList<>();

    @RequestMapping("/entity/all")
    public List<GenericEntity> findAll() {
        return entityList;
    }

    @RequestMapping(value = "/entity", method = RequestMethod.POST)
    public GenericEntity addEntity(GenericEntity entity) {
        entityList.add(entity);
        return entity;
    }

    @RequestMapping("/entity/findby/{id}")
    public GenericEntity findById(@PathVariable Long id) {
        return entityList.stream().
                 filter(entity -> entity.getId().equals(id)).
                   findFirst().get();
    }
}

Source: https://www.baeldung.com/spring-boot-starters

hollow basalt
#

i still don't like xml configs

#

i've been to enterprises with spring and now current with .net also xml

trail remnant
#

I mean, it's kinda a tossup. I've seen programmers have no small shortage of stupid errors manually editing YAML files. For Maven, the XML is super simple, and clearly explicit. I think there's not a big difference in terms of usability. The tags also make it easier to find specific things, which is an advantage over YAML using a single - dash character to tell the difference between a map and a list of maps. XML is more verbose, but in either case you'll be reading the documentation to understand the custom schemas while you're editing things, so it doesn't matter that much.

#

I'd personally choose to write YAML or JSON, but I can understand why some teams and technology stacks choose XML.

hollow basalt
#

the tags also make it easier to find specific things, which is an advantage over YAML using a single - dash character to tell the difference between a map and a list of maps.
yup, also experienced the list syntax error

#

thanks YAML

#

i'd go with JSON

trail remnant
#

You know, technically a JSON file is valid YAML. So if you really don't want to use YAML, you can always just write JSON instead.

#

YAML adds recursive references though, which JSON doesn't have.
Although all of the markup languages fall apart when you need to do templating. Then everything becomes a mess, and you just hate your entire life.

hollow basalt
#

templating
where XML shines,
when we literally have thousands of HTML templating engines,
XML is a easier

#

if I create a meme library.
i'd go with CSV or XSLX as config files

#

just to screw someover other

trail remnant
#

Just write your own custom file format.

hollow basalt
#

i'd create a custom file format with an existing standard file extension

#

maybe like config.exe

#

🤣

trail remnant
#

"Just write a custom application to interface with this binary"

hollow basalt
#

i'd create a bootstraper
meme-config-bootstrapper

#

a new node application just to edit a config of another

#

then id everything so can't use the same config application to edit multiple actual application

trail remnant
#

Because experienced developers have seen so many stupid design decisions, we're masters of trolling people with bad designs.

hollow basalt
#

when all they've seen are stupid decisions, they would accept ours too

#

why you deleted it, i haven't read it yet

trail remnant
#

It was an mp4, but discord was too stupid to render it correctly since the URL didn't end in .mp4

hollow basalt
#

a great deterrent for bots and humans alike

#

I like it

silk eagle
#

i feel like that's easier for bots

#

gotta find 2 arrows that point in the same direction and then rotate them until they face up

next cipher
#

wow that's a little evil

#

that's probably harder for any human who doesn't have good spatial reasoning skills (aka non engineers) than for bots lol

trail remnant
#

There are all sorts of evil UI things out there. A few years ago there was an informal competition to design the worst UI element ever.

#

I think my favorite one was the random number generator to enter your phone number.

next cipher
#

that was a fun post

#

i am partial to the one that was a little "drag and let go to fire" canon that had to ricochet and hit the right place for each digit

#

flashbacks to early flash games in middle school

trail remnant
#

There were so many wonderful ideas.

wind horizon
trail remnant
#

But I just loved the evilness of something clearly designed to be almost impossible, that was technically doable.

wind horizon
nocturne galleon
#

also considering how much i dislike python, something feeling like it isn't a good thing, i get what you mean though :p

trail remnant
#

Disliking python? How could you.

nocturne galleon
#

(an example of how mixin works)

@Mixin(Minecraft.class)
public class MixinMinecraft {
    @Inject(method = "<clinit>", at = @At("TAIL"))
    private static void clinit(CallbackInfo ci) {
        System.out.println("\n\n\n\n\n\n\n\nThis got called by minecraft and is your custom mixin.\n\n\n\n\n\n\n\n");
    }
}

this injects the clinit method into the end of the static initializer of the Minecraft class

trail remnant
#

But okay, hear me out: Aren't you basically using mixins when you're working with someone else's webserver?

#

Webservers need access to OS hardware resources like ports and things. That's some pretty low level code that your application probably shouldn't have access to.

umbral saffron
#

i’m trying to run a file on my pi 4 via terminal and it appears i don’t have access to said file

#

how would i obtain access

trail remnant
trail remnant
nocturne galleon
silk eagle
#

or slap a sudo at the start of the command to run it

nocturne galleon
#

Unless it's a program that actually needs to do something with that privilege, don't

#

Also make sure that if it's not in your $PATH that you're running it with ./

#

Could just be the shell outputting a confusing error because of that

umbral saffron
nocturne galleon
#

I guess you don't own the file

#

What file is it?

silk eagle
umbral saffron
#

it’s a program i wrote in thonny

#

so it’s completely mine

nocturne galleon
#

:concern:

#

Did you run thonny as root? That's the only thing i can think of that would explain it other than setuid shenanigans

#

And if you did, you probably shouldn't

silk eagle
#

i have one last suggestion

#

sudo chown it

nocturne galleon
#

But yeah I'd just chown it first and then chmod it

umbral saffron
#

ah right

#

i completely forgot that existed

silk eagle
#

everyone always does

nocturne galleon
#

I accidentally chowned /usr/bin once :p

#

Made sudo stop working since it relies on setuid

#

Kinda funny

#

It was when i knew very little about linux

umbral saffron
#

yikes

#

wait i forgot my username 💀

#

the default one doesn’t work

#

i’m being stupid sorry

#

how do i find the user

nocturne galleon
# umbral saffron how do i find the user

To see your username run whoami, to list all users run awk -F: '{print $1}' /etc/passwd, your username might also just be in your PS1 (the line that your shell shows after every command)

#

Fixed the awk command, forgot the most important part

#

:p

umbral saffron
#

ah ok

#

still says i don’t have ownership

#

but tysm

trail remnant
trail remnant
#

I've got a lot of feelings I'm working through right now, so I'm just going to slowly trickle funny software development memes in here.

nocturne galleon
#

wouldn't it be as simple as writing the bytes in reverse order or am i missing something?

midnight wind
#

why in the world would you do it manually

#

manually rearrange the bytes...

#

file extension means nothing

#

doesn't change the format of the data

#

also what type of data?

#

unicode text?

#

and what do you need to do with it exactly?

#

change to wav?

#

found this

#

oh nevermind

nocturne galleon
#

i don't know about python but with kotlin i'd probably do something like

val file = File("filename")
file.writeBytes(file.readBytes().reverse())

there is the issue that if the file is very big it could cause memory issues since it reads all of it into memory at once, but that's probably not an issue with a sound file

midnight wind
#

doesn't support bfwave

midnight wind
#

since you have the header which needs to stay

nocturne galleon
midnight wind
#

this is not the stuff I'm experienced in

nocturne galleon
#

so i just have to change my QDataStream to little endian and then i can deserialize everything easily

#

stream.setByteOrder(QDataStream::LittleEndian);

trail remnant
midnight wind
#

should save this image, perfectly describes it

trail remnant
#

File extensions are just labels on the file. It doesn't change what's inside.

supple hull
#

My god, I'm witnessing CSS hellscape. Working on a component library and I can't touch a child element and mofos nonstop are using JS to calc widths and heights.

trail remnant
#

It took me long enough to find these, so have some more examples:

trail remnant
#

The whole virtual DOM is neat and very useful, but it's also the worst thing ever.

supple hull
#

I live in front end and I can write CSS in my sleep, the problem is other people don't

#

UX dev

trail remnant
#

Theoretically, you can build up custom elements that you can harmlessly inject into another webpage, without colliding with the existing styles, because the custom element is in the shadow DOM, which namespaces itself separately from the real DOM.
Practically, no one builds components that work perfectly, so you end up with some super minor CSS change you want to make, but it's nearly impossible to get at the complex set of nested HTML elements to make a simple change. Unlike traditional HTML elements, you can't easily modify whatever you want, which takes away one of the most useful parts about web development.

supple hull
#

They brutalized the front end by using white space and copy pasta to try and ellipses two lines of text. Their correction to the dom not calculating the width was to then force the widths and heights multiple times with JS

#

They also did a lot of wacky flex stuff and tried to correct with overflows

trail remnant
#

Yeah, shadow DOM is nice when internal elements behave like traditional elements, but sometimes they do something like set a minimum width, or don't properly scale the width, which can screw up everything.

supple hull
#

Do you mean virtual dom?

#

This isn't web components, its React

trail remnant
#

Actually, I'm not sure. I don't do enough front end to know the difference.

#

I've poked at "import X for free!" a few times, and it's been annoying each time.

supple hull
#

man, what a day so little accomplished

#

Ha

#

Oh boy, so I guess I was working on a code base by overseas devs from one of the cheaper countries, makes more sense now

wind horizon
wind horizon
supple hull
#

they were using styled-componets so you'd think they'd actually be able to figure things out

wind horizon
#

2 jobs ago I worked on a shared component library, with the goal being to make it 90% if the time no tickets need css. Everything was just plug and play react components for all your layout.

It was so nice when it was done, because the avg FE dev doesn't know how todo proper css or heck even html these days. You just get a tone of devs that memorized react specificlly and hack their way through all the css and html making a mess.

wind horizon
supple hull
#

The issue is that there's that web 1.0 tendency to JS your way to victory when things aren't rendering right

#

I've seen that a lot

wind horizon
#

Every week I swear I have to comment on a PR that has tones of CSS rules all as props. I'm like what's the point in passing all our margin and everything from js into this?

supple hull
#

hell, I even corrected our contracted dev's work since he was using fixed widths since he wanted to position something and I was like display: inline-flex my guy

#

CSS is kinda trash but at the same time, it can be done sanely.

wind horizon
#

Then don't get me started on when ppl set height and width to match the figma.

I'm like the figma is static, devices are not very sparingly should you statically set the size like that. At least use max- so it can size down. 😭

supple hull
#

Oh man, people who copy and paste out sketch and figma

wind horizon
#

I swear that is most JS devs today

#

Copy past figma lol

supple hull
#
 top: 100px;
left: 40px```
wind horizon
#

Hahaha yesssss

supple hull
#

then responsive fail

wind horizon
#

Then in the next PR someone has to change the stores again for one tiny thing instead having made it responsive to start

#

I try to favor using flex and such and then controlling the container.

supple hull
#

I might not be the strongest programmer, but I can fix your react like no other. It's the weird thing about job hunting is if someone hits me with CS questions like deep O notation, i'll stare like a deer in headlights but I'll stop you from forcing a gazillion JS executions just top print a title at the top of your div

#

This is what happens when you have an art degree but decide programming is easier than art

#

Hence the whole I'm a ux developer

wind horizon
#

my first big tech type of job they sent me tests to do in advance and I did OK on the CS side I think like an 80, but they said I scored perfect 100 on the reactor side and I was pretty much guaranteed the job at that point they said. Lol but they were looking for react specialist to help their backend devs learn react on this project.

supple hull
#

I'm always amazed at the projects I see, and how much logic gets pushed to the react side of things

wind horizon
#

I worked in an office app, so in that case it has to be. That was a near app

#

But usual I'm the person yelling to stop filtering all data on current and use api calls todo it lol

#

I helped fix an app that was "slow" that's all I was told.

Opened it they were sending serval thousands of records to the client. It legit pulled all data from DB and sent it to client then tried todo all the work in client lol

supple hull
#

The worst was one (I think i mentioned) for auto dealerships and our team was brought into help bring guidance and they had this crazy stack where they had old school 1970s computers still in operations for the dealerships so they had to create a separate back end team to just get the data into a modernish database and pull in data from crazy parts. React side of things was a horrible bad mess.

#

SELECT * FROM table_name ?

supple hull
#

I suppose if you fart out the enter DB into a JSON you can do all sorts of stuff with it 🙂

midnight wind
#

I look at these stories and wonder if I over engineer my stuff lol

supple hull
#

@midnight wind a good 10 hours of programming can save you at least 1 hour of planning

#

the auto dealership software company was sunken cost fallacy all the way down.

#

They just needed to burn their react library, create stories for their ux library and pick a paradigm of how to control the ui widgets.

#

They printed a metric assload of data into complex tables and had this paid react software that could a lot but it seemed like no one understood it.
data went in -> magic -> data displayed.

#

That also made life hard. It was interesting as a theoretical project as they were trying to create a react front end to a bunch of systems that auto dealerships use so you could retire several MS apps into one web interface and be able to sign and work in your department, and see your parts inventory and create all the printed docs you need. It was pretty complex.

#

the project wasn't going well so they did the classic management thing and threw more and more developers at the problem to make it go faster, hence how my company as a 3rd party ended up involved.

#

it did everything from payroll for employees to like making the proper docs for whatever state you were in to sell the car to CRM stuff. Absolutely huge.

#

idea was one piece of software to run your entire dealership

wind horizon
#

I think one thinn with modern web dev work is we have reduced barriers to enrrily. Like it's super easy to get going on react and for a FE dev to work BE thanks to Node / JS on BE now.

But those low barriers to entry can also be bad if you have devs who don't care / think about things and just hack through it until it kind some how works.

#

Like the amount the meme is shared of idk why my code works always frightens me.

supple hull
#

If I had to approach that project, I'd honestly suggested something like web components instead of react possibly. Who cares if you hammer the dom with a few too many requests and have page reloads? You could at least bury different tech into the components themselves as needed.

#

getting an applications to ship that literally spans so many sectors like inventory management, book keeping, CRM etc is bound to never all at once

wind horizon
#

Yeah micro front-end works decent for large systems but technically made up of many smaller apps.

raw shoal
#

Hi Hi anyone here good with Squirrel Programming? Getting the weirdest bug..

hollow basalt
#

No

hollow basalt
#

I think he meant the actual squirrel lang

#

I do hope so

#

And i just found about it today

trail remnant
#

Huh. Apparently that's a thing.

#

Man, our field is so strange. It's hard to tell a bad joke apart from a real legitimate question.

hollow basalt
#

The key is to accept everything as a bad joke

trail remnant
#

What Does it look like?
squirrel's syntax is similar to C/C++/Java etc... but the language has a very dynamic nature like Python/Lua etc...

but y thou

hollow basalt
#

Until they assured they were serious

trail remnant
#

Why design another language for integrating with game engines?

hollow basalt
#

Yea, just use c to make the game devs hate themselves

trail remnant
#

But like, Lua has those things, and is fairly common for scripting in game dev.

wind horizon
#

Video games today have such massive RAM requirements I feel like the need to be lightweight is kind of funny.

trail remnant
#

Huh, okay, the history of Squirrel is literally to fix problems with embedding Lua into games. It apparently steals a lot of API design cues from Lua.

hollow basalt
trail remnant
#

The answer is that as little as 3 years ago, most games were designed for a console with only 2mb of L2 cache, and 8GB of shared memory between the CPU and GPU.

#

8 years before that, the "top" end of the console market had 512 MEGABYTES of total memory.

raw shoal
#

Yeah I meant the Squirrel programming language @trail remnant@hollow basalt

trail remnant
#

"Worst" for technical specs, yes. But they do have advantages, like being able to provide developers with consistency to truly push the hardware to its limits, without needing to worry about a million different configurations causing problems.

raw shoal
#

@trail remnantwelcome to source engine

trail remnant
#

Does this mean that a substantial part of Titanfall is written in squirrel?

raw shoal
#

pretty sure it is

#

a lot of apex legends is

wind horizon
trail remnant
wind horizon
#

Consoles have their place for sure, cheap and easy when compared to a pc.

trail remnant
#

I'm still considering buying a PS5, since it's wayyy cheaper than any current GPU that beats my 2070, and there are a lot of really cool games on there. (Horizon Dawn)

wind horizon
#

At least consoles are finally targeting higher refresh rates, was terrible how long they stayed at 30s.

trail remnant
#

I'm not looking for a massive increase in GPU power. I'm constantly looking for how to upgrade my battlestation because it's a big hobby of mine.

#

And right now the next generation is sitting right around the corner, and it's going to bring massive performance uplifts. Plus, everything is crazy expensive right now.

wind horizon
#

Yeah but why the option of PS5 then, since it’s not like a huge upgrade or anything and it’s hard to get too. Or just for like exclusives and such or do lots of couch play?

I went down the console road again with ps4 thinking I missed couch play with a controller. It collected dust and was hardly played, learned I honestly do like my pc more. Haha

trail remnant
#

eXcLuSiVeS

wind horizon
#

Ugh necessary evil I guess so long as they do them. Haha

trail remnant
#

I played Horizon Zero Dawn on a roommate's PS4, and it was pretty dope.

#

I really want to play the next game, but I lack the hardware.

wind horizon
#

Yeah at least that came to PC, but took forever haha

hollow basalt
#

oh nooo, our ADT conversation

trail remnant
#

Well, mods finally got involved.

nocturne galleon
#

nyoo my knoweldge

trail remnant
#

@nocturne galleon I missed your question. Can you repost?

hollow basalt
trail remnant
#

Yeah, sorry about that.

nocturne galleon
#

alright, thanks for the talk guys
see you 👍

hollow basalt
#

now have have a 15sec slow 😢

trail remnant
#

Dang. My discussion of the CLR is gone. That sucks.

hollow basalt
trail remnant
#

On that note, does anyone know of a good place to have serious discussions about technical topics? I've looked around a bit but I can't find anywhere good. There are only 3-4 active developers in this chat, which is kinda rough.

hollow basalt
#

near the watercooler at your company (if you're not remote)

midnight wind
#

in the code opt-in

wind horizon
#

I mostly do it at work.

I finally learned.my wife doesn't want to hear me gush over how much fun I'm having in Web Assembly. 😂

trail remnant
#

I'm remote, and I'm probably staying remote for a long time. The company Slack is okay for super-professional stuff, but it's inactive outside of work hours, and during work I need to be productive.

wind horizon
trail remnant
#

Man, I just need to start a blog.

midnight wind
hollow basalt
wind horizon
#

I start by asking how everyone's weekend was, which is a segway into me playing with wasm on the weekend.

Of I do it reverse asking ppls plans for the weekend. Lol

#

The super obsessed devs enjoy it, but I'm sure a large majority of ppl are like.

How do I tell this guy I just want to log off. Haha

hollow basalt
#

"Oh you gonna go hiking"
"that's cool, you know what else is cool i would implement this in webassembly"

wind horizon
hollow basalt
#

How do I tell this guy I just want to log off. Haha
send him an email afterwards about the gist of the dev convo just to screw him over

trail remnant
#

Shower thought: Slow mode beyond like 5 seconds makes chat much worse if there's no character limit. It probably leads to less discussion and more rants, since you're incentivized to make longer posts with less feedback.

#

With a character limit it just kills the chat.

hollow basalt
wind horizon
#

I like Medium at first, now I feel it's over run with basic tutorials.

"The different types of variables in JS" 😆

trail remnant
#

sigh
I want to write stuff, but the technical work of setting up and maintaining a website eats into the time I would spend writing.

I should probably just start a Medium blog, but ehhhhhh. I'm not a super big fan of Medium, and I know a lot of other people aren't. I have mixed feelings about using their platform.

hollow basalt
hollow basalt
trail remnant
#

Are there any other good platforms for writing blogs? Preferably one with support for Markdown editing?

wind horizon
hollow basalt
wind horizon
hollow basalt
#

and we are already at the 2nd level .
next builds into react

wind horizon
#

I had to write some jquery today!!!

Was an ancient internal tool that was missing a feature and annoyed me. Haha

hollow basalt
#

as long as they keep putting in features into ES, jquery would be used less and less

wind horizon
#

Yeah I don't use jquery at all for prod / real dev work. Can't remeber the last time I did.

hollow basalt
#

fetch brings tears 🥲 so much cleaner

midnight wind
hollow basalt
wind horizon
midnight wind
hollow basalt
wind horizon
#

When I see pre ES6 code I always wonder, how did we live with ourselves. 😆

I was mostly writing ASP and some .NET back than doing data processing type system. But still, like anonymous function without the arrow function are 🤮 looking

hollow basalt
#

the horrors

#

along the lines of

wind horizon
#

Hahaha so true

#

I'll call this and I'll call this and I'll call this. 😭

Not to mention the issue of dealing with / passing or binding "this" if you needed before arrow functions.

hollow basalt
#

what is "this"

#

(stolen from shutterstock, hence the zoom icon)

silk eagle
cloud knot
empty sentinel
#

Quick question. I’ve used winforms in the past where it was really easy to build a GUI using a WYSIWYG editor. Is there anything like that for Python?

hollow basalt
#

considering python doesn't have a standard gui, gonna check for each library.
for Qt, they have the Qt-designer to be language agnostic (pytho,c++ etc)
@empty sentinel

empty sentinel
#

Hmm.. QT is WYSIWYG?

#

Oh neat. It is.

hollow basalt
#

if only we have a python-standrd gui, so people would build tools on top of it

#

a good thing that microsoft got the .net community on lock for VS

empty sentinel
#

I could probably sneak that on to my work laptop. I will also have to look in to whether or not it can use poweshell as the “code base”

empty sentinel
#

Sadly, yes.

hollow basalt
#

why?
who would be the user

empty sentinel
#

And AdminScriptEditor is somehow corrupted on install now at work.

#

Me and 2 teams. Super basic stuff. But it does pull data from Active Directory and has links to documents and such.

hollow basalt
#

why PS? can't install runtime on clients?

empty sentinel
#

Basically, you type in a name or a computer name and it pulls up all kinds of info about it.

#
  1. I am very much not a programmer. I can script a bit though.
hollow basalt
#

I'm not well versed with MS, they don't expose AD functionality through libraries?
so you need to call system tools?

empty sentinel
#
  1. I do convert it to an Exe, but it’s just a wrapper for the actual script
#

Maybe. PS has worked well enough for getting the info I need so far. 🙂

hollow basalt
empty sentinel
#

Lol. I don’t have access to VS (just VS code)

hollow basalt
empty sentinel
#

In PS, I’m standardizing all output as an object, which allows me to set a *.bool value as well so higher level logic can easily tell if the function itself thinks it succeeded.

hollow basalt
#

2019, seems to me

hollow basalt
#

so you're doing it in python with calls to PS?

empty sentinel
#

Lol. Say you call a function and it returns anything. The bool of that call is now $true even if whatever the function did failed. To work around this, you can create a whole bunch of If’s to check the data returned by the function, if you can implement all of those checks in the called function itself and spit out a $bool value so you don’t have to keep implementing checks in every code that calls the function.

empty sentinel
#

So far, I have 0 Python code or experience.

hollow basalt
hollow basalt
#

if the management is willing to invest employee hrs into that migration, would say worth it
yo team sanity would be intact after some time

empty sentinel
#

Management can’t afford to let me be interested. My team is overrun with support tickets at the moment. So much so that we were just authorized a team expansion - which hasn’t occurred in at least the past 10 years or so.

hollow basalt
#

Would you say, you can't invest to R&D because of everyday ops?

empty sentinel
#

So I carve out time when waiting for other tasks to finish up. 🙂

nocturne galleon
# hollow basalt a good thing that microsoft got the .net community on lock for VS

Imo a project that forces contributors to use a specific IDE is not worth contributing to, sadly that seems to be pretty common with visual studio projects, there is also the fact vs is proprietary, i do all my jvm development in intellij's community edition, and all non jvm development in vscodium, both are FOSS, and anyone can use anything else they want to

empty sentinel
#

My whole job is OPs. 🙂

hollow basalt
#

sounds like python isn't realistic for the moment, maybe creating new scripts in python but migration is not achievable

hollow basalt
#

but hey, your dpt is much bigger than mine

#

you support/help more people

empty sentinel
#

5 people, soon to be 6. 3,000 computers, 2,000 employees I think.

hollow basalt
#

with that in mind. "overrun" might be downplaying

#

even 1hr of free time [no tickets], you could several things in python.
so goodluck

empty sentinel
#

I’m a firm believer is not just firefighting, but also working on fire prevention and firefighting tools.

hollow basalt
#

couldn't agree more. Would rather bug employees to do X to prevent incidents than ask for RCAs

hollow basalt
empty sentinel
#

We have exactly 1 PS script I would place in the automation category. All other stuff is PS/CMD and mostly one-off fixes for various things.

#

We just started working on a script to autoprune stale computers out of AD. That would fall under automation when it is complete

hollow basalt
#

All other stuff is PS/CMD and mostly one-off fixes for various things.
Do you keep those somewhere or is it literally useless after the request

hollow basalt
midnight wind
#

power automate

hollow basalt
#

I wouldn't exactly say microsoft does python library

empty sentinel
#

Mostly the scripts are stored in random folders like “bill t”.

hollow basalt
empty sentinel
#

I’m trying to clean up one of our main folders but I’m hitting a decent amount of resistance.

midnight wind
#

Since my boss wants to make a system of keeping track of inventory

hollow basalt
#

but why do you use forms focus

midnight wind
#

Destroyed drives

midnight wind
#

So in that sense, it works.

hollow basalt
#

Power automate sucks so bad, I wouldn't actually use it.
if you think you could do it in other ways, do it

midnight wind
#

But for inventory management, I would need something better

hollow basalt
#

if you are locked with power automate, check if this works:
Forms -> Power Automate (send HTTP post) -> (your app here)
basically just use PA to dump everything

empty sentinel
# hollow basalt resistance for what?

Resistance from a person who didn’t even want to use that folder in the first place and has made no effort to discuss or reason with me other than “I have links to the directory”.

midnight wind
#

A worksheet for each client. Also this is just in dev still, a side project.

hollow basalt
empty sentinel
#

Links to files/folders. The folder is small and there’s no reason why the links couldn’t be updated in less than 10 minutes.

#

We’re talking like, desktop shortcuts. Not even web links

hollow basalt
empty sentinel
#

Lol. I’m not evil like that. 😛

hollow basalt
#

sometimes being evil is the best way for the greater good

empty sentinel
#

Naw. It’s not like this is the first time I’ve cleaned up a folder. You have to work with those you’re affecting. In the past, I had the authority to spend time and work with each person. Now, I do not have that authority, so if someone says “no, I don’t feel like lifting a finger to make anything better”, I have to live with that.

hollow basalt
#

that sucks. "I have to live with that."
-1 life points

empty sentinel
#

…doesn’t mean I can’t pull my files out of the folder and leave them to their own devices though.

#

…and file it under the better filing system

hollow basalt
#

do it, then let theirs be chaotic

empty sentinel
#

That only works so much because they are using the filing system I set up within their folder. And though I don’t like to gloat, it works for the most part. Lol.

hollow basalt
#

Doesn't sound like gloat to me.

empty sentinel
#

Everyone who moves on from my workplace gets their stuff migrated to the new filing system for sanity.

#

So it will be a slow process. But it is my belief people will eventually catch on and learn to use it effectively.

hollow basalt
#

how long does it take to migrate

empty sentinel
#

It may not be perfect, but it’s a heckuva lot better than the chaos we have now.

#

Migration is literally just moving a folder under one of 3 locations: home, group, software

#

If it’s a home folder, all lower case, persons first dot last name

#

If it’s a group, must go under a sub folder with the group or team name. All lower case.

midnight wind
empty sentinel
#

Software right now is free-form. But will eventually be organized into logical sub folders.

midnight wind
#

They are flexible, I just haven't done much research on eventually the goal which is inventory management

hollow basalt
hollow basalt
empty sentinel
#

Drivers, scripts, software, IT utilities, etc…

midnight wind
#

Well something in cloud preferably. I would need to do more research

hollow basalt
hollow basalt
midnight wind
#

Bc rn when clients bring stuff in, a form is just attached about what it is, but not into a database or anything

#

Boss wants things to be more trackable and documented. Records of drives destroyed, etc.

empty sentinel
#

My head. I used to have it documented at a previous job, including super flexible and easy to manage ACL’s, but I forgot to take that documentation with me and the IT guy who took over for me literally deleted almost everything.

hollow basalt
hollow basalt
empty sentinel
#

I have a picture floating around somewhere that shows a corner of a paper that shows part of the ACL setup. I just need to do the work to reconstruct it

#

LOL

hollow basalt
#

a corner of a paper
the information 🤣

midnight wind
hollow basalt
empty sentinel
#

That pic of the corner of the documentation is no longer on my phone. Gotta dig it up in my archives. shudder

hollow basalt
wind horizon
#

I have had todo AD scripting several years ago, PS was one of the easiest thanks to access to those .NET tools inside it. However I never had any type of GUI attached. 🤔

When I have had to work with AD in other languages such as Node, Go, and PHP I found it easiest to use LDAP libraries since they exist for all languages and are easy to connect to AD.

In most of these languages the GUI was a web client, so the web client could access and modify things like AD groups and such. (If user had permission in AD)

timber basin
#

Can someone explain what 'bind' does in JavaScript? Does it just essentially bind a certain 'this' to a new function without messing with the original function?

timber basin
#

thanks

silk eagle
#

a certain 'this', what a beautiful language

nocturne galleon
#

Do smaller local business use leet code questions or is that more of a FANG type thing?

hollow basalt
#

Do they actually use it

wind horizon
# nocturne galleon Do smaller local business use leet code questions or is that more of a FANG typ...

It's hard to know, I have had leet code like question at a medium size company and then I interviewed for FANG and worked in 2 Fortune top 25 tech companies and didn't have a single leet code question.

Not sure where you are at in your career, but first 2 "levels" of software engineer shouldn't have many if any unless it's a job that requires that type of work.

I think the type of role will effect it a lot, for example a Front End role at FANG I interviewed for had none and then a SDN type role I interviewed for had some algo questions and it made sense because this role I'd be working with cryptography.

nocturne galleon
# wind horizon It's hard to know, I have had leet code like question at a medium size company a...

I am looking for a software engineer internship. There seems to be a decent amount of medium sized companies near me that hire. From looking around on Reddit every person there says you need to be a leetcode master to get a internship

From the internship listings I have seen most just say have experience in a OOP language like java,c++,c#,kotlin. Some specify specifically like C if it is a car company.

wind horizon
#

If you are going for a paid internship at a tech company it should likely be posted for a type of role. The skills you need should relate to that role.

Often times interns I worked with at the last company did get passed around to a few diff things to give them exposure, but still we picked up ppl who had the skills and interest in what we were doing.

For example last job we used Python and React, so we often looked for people who knew one of those or at least had interest in building a web app.

#

It was also a cybersecurity company, so we looked for people with interest or knowledge in that space as well.

#

The interns I worked with we never asked leet code, those interviews were far more verbal with lightweight coding possibly.

However every company is different so my experience isn't going tk be the same you see. Haha

That's not to say it was "easy" since interns often didn't have real experience and so these interviews likely were hard for them and competitive.

#

My team of roughly 25 picked up like 2-3 interns per semester, i have no idea on total applications since I only got to see those that made it past HR. I think avg was like 10-20 made it through screening before we settled on some, but sometimes less since I once the spots were filled we stopped interviewing.

timber basin
#

It all depends im still in school rn and theyre pushing heaving MERN stack

wind horizon
#

Every company is different for sure, but I'd say start with deciding the type of internship you want / what interests you. Then begin working on those skills and try your best to go into the interview with confidence and showing your not only eager to learn but motivated self starter who has done a lot of your own research in advance.

timber basin
#

They say that if youre good with MERN you should be able to find a job

nocturne galleon
#

Yeah, I mean I hardly even see data structures as a requirement, but the listings are pretty vague for internships. Good to hear that not everyone uses leet code problems though. If they don’t ask coding problems off of leet code what do they typically consist of?

timber basin
#

Im just doing everything tbh, so far ive learned C/C++, Python, Java, Javascript, React and some PyTorch

#

Javascript to me seems like the most hot thing to learn rn and there was one other language off the top of my head but im blanking

#

Lots of cybersecurity stuff also tends to be more python

nocturne galleon
#

I think right now I just want to get experience in the industry. I recently got an associates in software engineering but my data structures are rusty have not really used them much. I know more about general programming than web development at this point in time though.

timber basin
#

Are you good with Javascript by any chance? Im kinda confused on something here

timber basin
#

function logExecutionTime(f) {
return function(arg) {
console.time('function timing');
const val = f(arg);
console.timeEnd('function timing');
return val;
};
}

function wasteTime(limit) { for(let i=0;i < limit; i++) { }}
wasteTime = logExecutionTime(wasteTime);
wasteTime(5000000);

#

im confused what the args are in that return

wind horizon
#

For example say you are going for a web dev role, you'd want to focus in on APIs, make sure you know the gist of REST and maybe consider basics of GQL. Deff have JS on your short list if it's a web app.

But if you want say IoT or embedded look more at compiled languages like C/C++.

#

If your into data / analytics more Python likely

timber basin
#

Whats a good way to learn more about pentesting

nocturne galleon
wind horizon
nocturne galleon
timber basin
#

I figured it out its passing the other functions arguments and using it to get the val

timber basin
wind horizon
#

To be good at pentesting though need to also understand how systems work, since need to understand how to exploit them. Otherwise you are confined to mostly being a script runner.

timber basin
#

I took an operating systems course

#

do you mean like how concurrent programming works?

#

The most they went into hacking though was stack smashing

wind horizon
timber basin
#

Ill look into that then, I do also remember there being some benefit to understanding how operating systems work and how the kernel operates

#

That class was also a pain in the ass

wind horizon
nocturne galleon
# wind horizon Haha yeah I'm not a big mobile fan, it's cool for sure but just never got into i...

Yeah it is something I would like to revisit later but I just want to get what I can before I start aiming for more advanced jobs/internships that use more complex programming. My web dev class was interesting too we did MVC with both php and jsp but once I finished it and went on to other classes I feel like I already forgot a lot it is hard to remember all these things when your next class is very different.

#

Android and windows 11 teamed up so that is cool too. My first internship can be something I am not fully into and I will still be happy with it.

wind horizon
wind horizon
#

I have been in interviews where the candidate was passed up simply because the team felt like they had no interest in the job. Avoid saying things like "I just need a job"

Everytime people leave the interview and in feedback say "I respect their honesty, but"

nocturne galleon
wind horizon
#

Yup when you do what you are interested in you'll excel and learn easily.

hollow basalt
#

microsoft excel

hollow basalt
#

I don't use it professionally

cloud knot
#

if a company asked me to do stupid stuff on hiring, i would just walk away