Error code 0x8004ff01

learn programming

2009.09.24 06:25 learn programming

A subreddit for all questions related to programming in any language.
[link]


2009.01.21 20:01 Sneakerheads Unite!

A subreddit for sneaker lovers.
[link]


2011.10.29 19:48 codereign Java help/tutorials/questions

General subreddit for helping with **Java** code.
[link]


2024.05.21 17:47 Shawkiiz Erorr 406

When i play any content then exit and try to play it again, error 406 appears !!
submitted by Shawkiiz to TiviMate [link] [comments]


2024.05.21 17:47 Danny__1029 Raspberry Pi Camera Issues

A few months ago I used Raspberry Pi for a university project where it worked fine, but now when I need it again using the same setup and code I am facing this error: danny@raspberrypi:~ $ libcamera-hello [0:01:02.368044506] [1540] INFO Camera camera_manager.cpp:284 libcamera v0.2.0+120-eb00c13d [0:01:02.455464037] [1543] WARN RPiSdn sdn.cpp:40 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise [0:01:02.459761849] [1543] WARN RPI vc4.cpp:392 Mismatch between Unicam and CamHelper for embedded data usage! [0:01:02.461000547] [1543] INFO RPI vc4.cpp:446 Registered camera /base/soc/i2c0mux/i2c@1/imx219@10 to Unicam device /dev/media2 and ISP device /dev/media0 [0:01:02.461082891] [1543] INFO RPI pipeline_base.cpp:1102 Using configuration file '/usshare/libcamera/pipeline/rpi/vc4/rpi_apps.yaml' Made X/EGL preview window Mode selection for 1640:1232:12:P SRGGB10_CSI2P,640x480/0 - Score: 4504.81 SRGGB10_CSI2P,1640x1232/0 - Score: 1000 SRGGB10_CSI2P,1920x1080/0 - Score: 1541.48 SRGGB10_CSI2P,3280x2464/0 - Score: 1718 SRGGB8,640x480/0 - Score: 5504.81 SRGGB8,1640x1232/0 - Score: 2000 SRGGB8,1920x1080/0 - Score: 2541.48 SRGGB8,3280x2464/0 - Score: 2718 Stream configuration adjusted [0:01:03.170841745] [1540] INFO Camera camera.cpp:1183 configuring streams: (0) 1640x1232-YUV420 (1) 1640x1232-SBGGR10_CSI2P [0:01:03.171540495] [1543] INFO RPI vc4.cpp:621 Sensor: /base/soc/i2c0mux/i2c@1/imx219@10 - Selected sensor format: 1640x1232-SBGGR10_1X10 - Selected unicam format: 1640x1232-pBAA [0:01:04.280679713] [1543] WARN V4L2 v4l2_videodevice.cpp:2007 /dev/video0[13:cap]: Dequeue timer of 1000000.00us has expired! [0:01:04.280920286] [1543] ERROR RPI pipeline_base.cpp:1334 Camera frontend has timed out! [0:01:04.280990599] [1543] ERROR RPI pipeline_base.cpp:1335 Please check that your camera sensor connector is attached securely. [0:01:04.281058620] [1543] ERROR RPI pipeline_base.cpp:1336 Alternatively, try another cable and/or sensor. ERROR: Device timeout detected, attempting a restart!!!
submitted by Danny__1029 to raspberry_pi [link] [comments]


2024.05.21 17:46 Clark649 Kobra 2 crap firmware. Not suitable for prints with critical dimensions.

Here is the review I am about to post on Amazon. 6 years ago I was proficient in configuring Marlin. I am no longer proficient and could have made some errors. Please correct me. My solution is to rip out the controller and install a new open controller system.
Amazon review:
This is my 6th 3D printer over many years.
This is an outstanding printer if all you do are art prints without any critical dimensions.
The engineering of the build is outstanding and it is a very fast printer.
Customer service is outstanding and they immediately shipped out a new power supply with upgraded Thermistors after the original power supply smoked. Startup after a my house lost power probably turned on the bed and nozzle heaters at the same instant causing the failure.
I bought this to print parts for a microscope build.
What I found is that complex parts with more than 1 critical dimension did not come out close to the specified dimension. That one dimension still had to be fudged in Scaling. These required dimensions had loose tolerances.
The slicer has Scale and Hole adjustments but these are for minor filament variations. They are not for gross firmware errors.
I took a quick look at the config h file for ver 3 firmware at Github. The esteps for XY were set to a whole number. When I went back to do a full workup of the numbers, version 3 firmware was no longer posted on on Github, a violation Gnu terms of open source license.
Their customer service is limited in this situation due to the refusal of Engineering to review and correct their code. The code was just plain speced wrong.
I will have to install a new control system that is not locked down in order to take advantage of the excellent mechanical build.
I have to print an idler pulley this week. It has several critical diameter dimensions. It will be done on my ancient Monoprice Mini Delta. It will come out correct the first time. I do not have the time to do the trial and error of having to change the model for the print meet the required dimensions.
submitted by Clark649 to anycubic [link] [comments]


2024.05.21 17:44 iandoug Is there an issue with some Unicode characters?

Is there an issue with some Unicode characters?
hi
Looping through a hash, index is two chars and value is int.
The part in question looks like this
hash
It seems to be barfing because of the " . Here's the debug trace output:
line is qz line is tj line is {Z line is ~J line is ⮠*
*** Uncaught exception RANGE_ERROR raised with {charHashType: *NULL_ENTITY_OBJECT* char: *NULL_ENTITY_OBJECT* integer: *NULL_ENTITY_OBJECT* reference: *NULL_ENTITY_OBJECT* INDEX }
The code is doing this: (The hash is called rawfollow.)
for key line range rawfollow do writeln("line is " <& line); a := line[1];
The "for" line is fingered as culprit.
Thanks, Ian
submitted by iandoug to seed7 [link] [comments]


2024.05.21 17:44 IXxArjellyxXI Error trying to generate code

So ik this issue has popped up for other ppl in the past but my issue is slightly different as I can’t just use my phone browser to log in as I would need to log in with a previously registered account…I had gotten this oculus from a friend and he had told me to just delete his meta account. So I deleted the meta account that was on the oculus and was forced to reboot, after the reboot was finished it took me to the device set up screen where I’m forced to generate a code to link my personal meta account to…but no code will generate, no matter how many times I press generate or reboot the system nothing changes…how do I fix this without having to log into the same account I literally just deleted off of the device in the first place
submitted by IXxArjellyxXI to MetaQuestVR [link] [comments]


2024.05.21 17:44 Semy_3 As founders we have 2 tasks. Not more. [disscusion]

As a founder, I have two tasks ⬇️
(Unfortunately, it took me many failed attempts to realize that)
  1. Bring the money
  2. Keep going...
Let's deep dive
  1. There are many ways to raise money: investments (VC, angel, etc.), selling products, grants (e.g., EU grants, companies like Google and Microsoft grants), crowdfunding, etc.
Unfortunately, as harsh as it is, if the project doesn't bring money, it will slowly die, whether there is a dark mode or not ;) I worked on a couple of projects like this, and it was painful to keep going...
2. Keep going is more complicated than it seems.
🥴 Keeping the motivation going, bringing new ideas, pushing, be better than worldwide competitors. It is a constant pressure.
🥴 Learning along the way. AI is accelerating things and opening new challenges and opportunities.
🥴 There is no room for many big, bad decisions. No matter how big you are, you can always make some errors, which might bring you significantly back. A couple of them, and things can go entirely wrong.
🥴 What to build next? Which sales channel to squeeze? What's the ROI of the following feature? What to do with the high churn rate? How will AI change my business? How to keep going with every activity? These are never-ending questions that need to be solved and arise along the way.
🥴 Life happens. It doesn't ask. And we know it can suck from time to time.
Keep going is much easier when you bring money and can pay people to solve the challenges. I greatly help me to keep going.
I noticed that:
Bringing the money is underestimated by 1st-time founders (I was in the same spot), and 2nd Keep going is underestimated by most founders. To get experience with 2nd, the founder has to experience years of building, working, and pushing.
Mental comfort can define whether you make or not in every stage of the product.
Brand building, design thinking, clean code, and personal branding are all sub-tasks of the main task. I even thought that making money was the most crucial part, but the more I am among founders, the more I think combining these 2 points defines successful founders vs. not.
In summary, founders must bring in money and stay energized. If any other sub-task doesn't solve these two points, we should kill it.
What do you think?
submitted by Semy_3 to startups [link] [comments]


2024.05.21 17:41 hierstrucker pc not working after updates, removing threats and cannot setup from a usb drive

pc not working after updates, removing threats and cannot setup from a usb drive
a few months ago my brother’s pc wasn’t even turning on so we went to a service to get it fixed, he changed the ram with a new one + changed the thermal paste. after that we were able to turn on the pc and use it but games like valorant would crash. first i checked for updates and there were several so i chose the option to download and install but during the process the pc started giving a stopcode and restarting the pc, tried a few more times; same thing. so i made a full scan and saw two threats: PUABundler:Win32/MemuPlay and PUADManager:Win32/DotBundler. microsoft windows defender took precautions and blocked the apps but to be safe i followed the instructions: 1. run the pc in safe mode 2. located the virus from windows defender 3. navigated to AppData from the user > Local > Programs > Dispout and deleted dispout.exe as well as the Dispout folder 4. cleaned %Temp% folder: AppData>Local>Temp, deleted everything inside 5. deleted windows defender history: C:>ProgramData>Microsoft>Windows Defender, deleted the Quarantine folder and in Microsoft>Windows Defender>Scans>History deleted the Results folder + everything inside the Service folder (detection history log etc)
after this it seemed to work fine but in a short time the pc started crashing again and got stuck on the startup screen or go to diagnose page things that I’ve tried: 1. going to BIOS page changing settings and rebooting 2. going to command prompt from the recovery page advanced settings and used the following codes: - sfc /scannow - DISM /Online /Cleanup-Image /RestoreHealth - chdsk /f /r (ran smoothly until the end with the message: Failed to transfer logged messages to the event log with status 6.) - bootrec /rebuildbed (end of the message: x: \windows\system32>bootrec /fixboot Access is denied,) 3. tried to boot from a usb drive with windows installation media but got errors: 0x0000005, 0x8007025D i have tried a lot more but i cant seem to remember bottom line is nothing worked and i cannot format the disk, reset the pc with a usb drive. i don’t know what to do. what else can i try? is it possible the RAM is faulty or the threats causing crashes even after i removed them? what should i do?
submitted by hierstrucker to WindowsHelp [link] [comments]


2024.05.21 17:38 DNRDIT French subway station

French subway station submitted by DNRDIT to PBSOD [link] [comments]


2024.05.21 17:37 BigDrew923 Need help disputing a case while on vacation abroad.

I shipped 3 returns in one shipment with 1 label that was provided by seller per their instruction and packing list. This seller is an official seller of a major sporting brand, and the label was directly sent from the brand email. I was able to double check to confirm with the seller via eBay message to match the tracking number I got from the email.
I shipped the items on 5/7 and contact eBay through chat as I was unable to upload the tracking number. eBay CSR stated that they will add it to my account. I then went on vacation abroad for the next few weeks until the 28th.
Tracking shows the shipment stop moving on 5/14. Today I get two messages from eBay regarding two of the return items. Apparently, the seller opened up two case saying they didn’t receive it. eBay closed both cases within the hour saying no refund. I went to dispute both case, but for one of the case it keeps giving me an error when I upload any pictures. Without any pictures, I cannot submit the dispute. I tried to upload picture for the past 14hrs getting the same error. I tried calling eBay thru Skype to see if I can reach anyone. But it doesn’t even let me enter their provided code before ending my calling. I sent a couple of email to eBay regarding this error I’m getting, but what else can I do until I get back to the US on the 28th? Or am I screwed.
submitted by BigDrew923 to Ebay [link] [comments]


2024.05.21 17:33 forseeninkboi Do falcon Xbox 360s have capacitor issues?

I've had an xbox 360 falcon come in recently which has a problem that occasionally it gives error code 0031, especially when not used for a long time (around 8 hours). I've checked the gpu and cpu and not only are the temps just fine, there is no artifacting once it's on and is in use. The only thing that comes to mind is the psu or the capacitors on the motherboard. Could it be the psu that is failing or the motherboard? Keep in mind that when the xbox 360 gets the error code, the light on the psu is orange and not green or red.
submitted by forseeninkboi to xbox360 [link] [comments]


2024.05.21 17:33 _spade_boy_ Power Pages Site(Developer Environment)

Power Pages Site(Developer Environment)
Got his internal server error while apllying datefilter
submitted by _spade_boy_ to Powerpages [link] [comments]


2024.05.21 17:33 Shockfreedomm I found error in the code and i got inifinite Egg Gachas 😂🤦🏼‍♂️

I found error in the code and i got inifinite Egg Gachas 😂🤦🏼‍♂️ submitted by Shockfreedomm to pokerogue [link] [comments]


2024.05.21 17:30 KiritoKaza how do i fix this and get websites to run again?

how do i fix this and get websites to run again?
This is my dads old laptop and its a dell latitude d 630 running a version of windows xp.... i want to exchange this for a discount on a newer pc but that requires that i install a hardware checking software from the internet.... but anytime i go to the internet every website shows this error how do i fix this.
submitted by KiritoKaza to WindowsHelp [link] [comments]


2024.05.21 17:27 d4vsanchez Type Inference Based on Another Variable

Hi everyone!
I'm having a hard time trying to come up with a type in Python that allows me to infer the type of a variable based on the value of another variable, and some help may be good.
My company has a policy that we should try to avoid exceptions, and instead return a tuple consisting of (result, error). Changing the company's policies is not easy, hence I'd like to improve the typing experience in the meantime.
The issue I'm facing is the following, suppose I have the following code example:
def test(num: int) -> tuple[int, None] tuple[None, str]: if num % 2 == 0: return (num, None) return (None, "number should be even") result, error = test(10) if error is not None: print("Error") else: print(result.bit_count()) 
If you run MyPy (see in MyPy Playground), you'll notice that it says that result is either an int or a None. I expect the inference from if error is not None to say that result in the else branch must be an int.
I've done the same example in TypeScript so you can see the type inference in action, where result is inferred as number in the else branch because there's no value in the error variable.
Do you know if it's possible to obtain the same behavior in Python?
submitted by d4vsanchez to learnpython [link] [comments]


2024.05.21 17:26 Guacamole_is_good I'm running into a typescript error that I cannot resolve. It is related to my interface and export.

I'm running into a typescript error that I cannot resolve. It is related to my interface and export.
This is in a NextJS project (14.2.3).
This is the error which occurs on npm run build:
src/app/Components/LandingPageAppBapage.tsx Type error: Page "src/app/Components/LandingPageAppBapage.tsx" has an invalid "default" export: Type "LandingPageAppBarProps" is not valid.
This is the related code:
``` interface LandingPageAppBarProps { mode: PaletteMode; toggleColorMode: () => void; }
const LandingPageAppBar: React.FC = ({ mode, toggleColorMode }) => { const [open, setOpen] = useState(false);
export default LandingPageAppBar;
```
This is my tsconfig.json:
``` { "compilerOptions": { "target": "ESNext", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "Bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", "incremental": true, "plugins": [ { "name": "next" } ], "baseUrl": "./", "paths": { "@/": ["./src/"] } }, "include": [ "next-env.d.ts", "src//*", ".next/types//*.ts", "jest.config.ts", "jest.setup.ts", "env.d.ts" ], "exclude": ["node_modules"], "typeAcquisition": { "include": ["jest"] } }
```
submitted by Guacamole_is_good to learnprogramming [link] [comments]


2024.05.21 17:23 poeticbear69 Experiencing crashes and inventory bugs

Experiencing crashes and inventory bugs
I have been grinding the new season for the last 4-5 days and starting from last night my game starting shutting down without any error codes, loading screen times increased from 20 seconds to literal minutes, my character sometimes get stuck just because, no stun or any crowd control on it until I use dash and inventory and merchant screens disappeared from time to time and sometimes ancestral legendary item descriptions does not show at all, I could not even find a relevant thread on the internet for it, deleted the game from the hdd and installed it on the ssd and still the problems continue, does anybody else experience this or how to solve it?
https://preview.redd.it/pfeuk4azrs1d1.png?width=2559&format=png&auto=webp&s=c83ebbf31c703eb4b2ba395a9f91511dc0aa76f0
submitted by poeticbear69 to D4_Bugs_and_Technical [link] [comments]


2024.05.21 17:22 mm079 Compile Pwnagotchi from Source

Note:

Please do forgive me if this has been mentioned, detailed, fully explained, etc. elsewhere. I've tried looking and it seems no one else has done it. I'm a fledging in the world of IT and always willing to learn more, please forgive my mistakes if any.

Backstory:

I've flashed the pwnagotchi img to a RPi0W, RPi3, and RPi4. However, I wanted to test something else and thought to run it in a VM. I attempted several times to convert the IMG to a ISO but fail, whether that be using ccd2iso, ImgBurn, UltraISO, acetoneiso, or iat. All of those that I mentioned failed presumably because it's not a disk image to install from, rather an image of an already fully created OS (). With that in mind, I attempted to take the IMG and run it in VirtualBox/VMware Workstation Pro: mounting the img and flashing to a vmdk - both failed. That lead me to the current topic.

Issue:

So I started with RPi-Desktop as the host. I installed the basic tools needed, and changed directories. Afterwards I ran curl on both evilsocket and jayofelony repositories to obtain the source code followed by tar to decompress, then changed to the new directory. Within I noted there wasn't a configure file that I was used to seeing in other repos, but did review the requirements.txt, README.md, and setup.py. The requirements didn't make it clear what the mentioned items were, so I took a guess based on the ".py" extension within the folder that maybe I should try to install with pip, which proved fruitful. Afterwards I ran the setup noting the following error:
byte-compiling /uslocal/lib/python3.9/dist-packages/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat144/LCD_1in44.py to LCD_1in44.cpython-39.pyc
Sorry: IndentationError: unexpected indent (LCD_1in44.py, line 30)
The error refers to: import numpy as np
Running the following:
sudo nano /uslocal/lib/python3.9/dist-packages/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat144/LCD_1in44.py
I changed it from:
import RPi.GPIO as GPIO
import numpy as np
from . import config
TO
import RPi.GPIO as GPIO
import numpy as np
from . import config
...which allowed the setup to complete with no errors and a few warnings.
pi@raspberry:~/Downloads/pwnagotchi-2.8.9 $ sudo ./setup.py install
running install
running build
running build_py
running egg_info
writing pwnagotchi.egg-info/PKG-INFO
writing dependency_links to pwnagotchi.egg-info/dependency_links.txt
writing requirements to pwnagotchi.egg-info/requires.txt
writing top-level names to pwnagotchi.egg-info/top_level.txt
reading manifest file 'pwnagotchi.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching '*.pyc'
warning: no previously-included files found matching '.DS_Store'
warning: no previously-included files found matching '.gitignore'
warning: no files found matching 'distribute_setup.py'
warning: no files found matching 'LICENSE'
warning: no files found matching '*.yml' under directory 'pwnagotchi'
writing manifest file 'pwnagotchi.egg-info/SOURCES.txt'
running build_scripts
running install_lib
running install_egg_info
removing '/uslocal/lib/python3.9/dist-packages/pwnagotchi-2.8.9.egg-info' (and everything under it)
Copying pwnagotchi.egg-info to /uslocal/lib/python3.9/dist-packages/pwnagotchi-2.8.9.egg-info
running install_scripts
changing mode of /uslocal/bin/pwnagotchi to 755
I proceeded to run the "make" command and obtained the following error after some time which presently has me stuck.
cd builder && sudo /usbin/packer init combined.json.pkr.hcl && sudo /usbin/unshare --uts /usbin/packer build -var "pwn_hostname=pwnagotchi" -var "pwn_version=2.8.9" combined.json.pkr.hcl
/usbin/packer: 1: Syntax error: "&" unexpected
make: *** [Makefile:50: image] Error 2
Did I provide enough detail? Has anyone one else attempted this? Any possible solutions? Maybe I'm going about the entire process all wrong, if so please do correct me.

Process:

sudo apt-get -y update && sudo apt-get -y install libz-dev libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext cmake gcc curl
cd ~/Downloads
curl -L https://github.com/jayofelony/pwnagotchi/archive/refs/tags/v2.8.9.tar.gz tar zx
cd pwnagotchi-2.8.9
pip install gym shimmy pycryptodome requests PyYAML scapy tweepy file-read-backwards inky smbus2 Pillow spidev gast flask flask-cors flask-wtf dbus-python toml python-dateutil websockets torch torchvision stable_baselines3 RPi.GPIO rpi_hardware_pwm pydrive2
chmod +x setup.py
sudo ./setup.py install
sudo make
submitted by mm079 to pwnagotchi [link] [comments]


2024.05.21 17:17 _spade_boy_ Power Pages Site

Interserver error while applying date filter what error it should be
submitted by _spade_boy_ to PowerApps [link] [comments]


2024.05.21 17:17 brandon_belkin How to compare measure versus theorical data

Hi, I'm going to use MATLAB to report some electronic Lab test. There are some voltage reading by and ADC (analog to digital converter) to compare the value with a reference value.
Example: I apply 1000mV from a trusted source at the ADC pin, I read 999mV from the ADC.
I'd like to perform some error analisys, and I wrote that code. Any suggestion on what kind of plot I can add, some stat plot to add to better explain the result? Any similar report link should be very appreciate.
Thanks
*** the code
clc clear variables close all more off
script.version = 00;
disp ("---") disp ("SCRPIT OCTAVE COMPATIBLE") disp ("ELABORATION BEGIN") disp ("---") script.id_total_script = tic;
dataMat = [ 0, 15, 0, 0, 0; 509, 498, 0, 0, 0; 1001, 1020, 0, 0, 0; 1502, 1503, 0, 0, 0; 2001, 1986, 0, 0, 0; 3000, 3013, 0, 0, 0; 4000, 3979, 0, 0, 0; 5001, 4991, 0, 0, 0; 6004, 5957, 0, 0, 0; 7000, 6961, 0, 0, 0; 8000, 7958, 0, 0, 0; 9000, 8954, 0, 0, 0; 9500, 9460, 0, 0, 0; 10000, 9959, 0, 0, 0];
colVoltRef = 1; colVoltMea = 2; colVoltErr = 3;
%calculate the difference between the measured value and the reference dataMat(:,colVoltErr) = dataMat(:,colVoltMea) - dataMat(:,colVoltRef);
% PLOT 1 figure hold on grid on box on %xlim([0 10]); ylim([0 12000]); plot(dataMat(:,colVoltRef)); plot(dataMat(:,colVoltRef), 'x'); %set(gca,'ytick',[-40:20:120]) title('Voltage sample') xlabel('Sample') ylabel('Voltage (mV)')
% PLOT 2 figure hold on grid on box on %xlim([0 10]); ylim([-100 100]); plot(dataMat(:,colVoltErr), 'x'); %set(gca,'ytick',[-40:20:120]) title('Voltage sample') xlabel('Sample') ylabel('Voltage Error (mV)')
% PLOT 3 figure hold on grid on box on %xlim([0 10]); ylim([-100 100]); plot(dataMat(:,colVoltRef), dataMat(:,colVoltErr), 'x'); %set(gca,'ytick',[-40:20:120]) title('Voltage sample') xlabel('Voltage reference (mV)') ylabel('Voltage Error (mV)')
toc(script.id_total_script) disp ("---") disp ("ELABORATION COMPLETED") disp ("---")
submitted by brandon_belkin to matlab [link] [comments]


2024.05.21 17:16 Significant_Bee5562 Undeclared identifier problem when add

when I include a .h form in other .h file I get the undeclared identifier error, for example this is the flow of my code: logo form->main menu->log in form->verification form then back to main menu but I get the bug going back to main menu.
submitted by Significant_Bee5562 to visualbasic [link] [comments]


2024.05.21 17:14 OpportunityStill9572 Error code D-0010

Help this Mama out please!
My sons birthday is next week and I wanted to go to the store and see what I could buy him but this error code keeps popping up!! This is a game on the ps4. He just updated the game last night to the newest version. He says this error just started a couple days ago prior to the update so idk if that is related or not.
Seems like Google doesn't have an answer and so many other people are dealing with this.
Anyone have a fix for me? It seems to be effecting the store, skins, etc.. Tia!
submitted by OpportunityStill9572 to Minecraft [link] [comments]


2024.05.21 17:14 Orkann Disagreement with co-worker over code style/structure

During code review my coworker left a remark about my code that I think is borderline nitpicking and actually wrong. I'd like your opinion on this.
The code:
 async afterCreate(event) { const emailService = getEmailService() const emailId = event.result.id let sentSuccessfully = false let failureReasonOrNull = null try { emailService.send(event.result) sentSuccessfully = true } catch (error) { failureReasonOrNull = error.response?.data?.message } try { await emailService.updateStatus( emailId, sentSuccessfully ? 'sent' : 'failed', failureReasonOrNull ) } catch (error) { console.error(error) return } } 
What my coworker is saying:
You can update status to “sent” after send a email and update on the catch update to "failed" no need to use sentSuccessfully ou failureReasonOrNull variables on top
I believe is more readable repeat updateStatus twice than of use ternary over the parameters and have a function scoped variables to do this
I think it's plain wrong to repeat the updateStatus call. Aside for being needlessly repeated code, if for example the method signature changes, we have to update it in two places instead
submitted by Orkann to cscareerquestions [link] [comments]


http://rodzice.org/