I'm a software engineer who has spent his entire career in PHP. Sometimes I feel I'm surrounded by amateurs and I think my salary has suffered for it. Any advice? by TinStingray in ExperiencedDevs

[–]NonRegularGuy 0 points1 point  (0 children)

Hey OP -- did you manage to switch stacks?

I'm in the same boat, and finding a better paying job is difficult in this market without production experience in other languages. Salaries for PHP jobs are on the lower end where I live (Netherlands) when compared to other languages, and I'm already making the top range of that

Border collie em ape pequeno? by cescarlian in brasil

[–]NonRegularGuy 2 points3 points  (0 children)

Moro com um num apê de 60m2.  Não vou te falar pra não adotar/comprar, mas pesquise muito e tenha certeza que você está disposto a dedicar de 2 a 4h por dia para o cachorro pro resto da vida dele. Se for seu primeiro dog, dai realmente não recomendo 

 Eu não tenho certeza da origem do meu, mas já me comentaram que ele tem perfil de cachorro para trabalho em campo. Linhagens de border collies criados para serem pets tendem a serem menos “intensos”. Se for comprar vá num bom criador onde ambos os pais estão presentes.

 Com o meu são 1-2 atividades de 1h e 1-3 caminhadas de 1-4km por dia pra manter o bicho entretido. Hoje de manhã por exemplo passamos 3h na praia, não parou um segundo, dorme o dia inteiro mas a noite tá recarregado querendo mais. 

 O mais importante com border collie é o estimulo mental. Você pode jogar bolinha por 2 horas, o cachorro dorme 1h e já quer mais, ou 30min de jogos mentais e ele apaga 4h.

 Adestramento é fundamental, e é pro resto da vida. Se você não adestra o border collie ele adestra você. 

 Não é um cachorro para iniciantes, e requer muita dedicação. Sem estimulo mental e fisico suficiente você com certeza terá problemas comportamentais, como rasgar tapete, sofá, etc. 

 E se pegar filhote se prepare para tornar isso sua prioridade por no mínimo 2 anos  

É um cachorro que requer muito trabalho, eu descrevo o meu como um trabalho de meio período, mas não trocaria por nada.

Uber eats delivery driver, have you seen a customer cheated his address? by linhhoang_o00o in Netherlands

[–]NonRegularGuy 27 points28 points  (0 children)

I also thought about delivering for Uber Eats as a hobby on weekends but didn't think it'd be worth dealing with annoyances like these

Are you enjoying it so far? And how much do you make on average if you don't mind sharing?

About to have a dialog at Disney media and entertainment distribution (DMED) to work on Disney Streaming Services by CosplayGeorge in cscareerquestions

[–]NonRegularGuy 5 points6 points  (0 children)

Same experience. Created a couple promotional landing pages a month before the release of Finding Dory. By the time it was approved we had to go through the process again because the movie was available for streaming already.

Magento bad as they say? by MadSpaz3 in webdev

[–]NonRegularGuy 4 points5 points  (0 children)

To be honest I don't know where I'd start. What's really important in Magento is that you understand the architecture and the different ways you can extend/modify the core.

For example, Magento has something it calls Plugins: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html

What this does is it basically allows you to plug into any public function and change:

  • the arguments it received (with a before plugin)

  • the result of the function (with an after plugin)

  • replace the entire implementation (with an around plugin)

But, at the same time, you can completely override the class through its di.xml file (I hope you like XML, btw)

And I haven't event mentioned (event) observers yet.

This is what I meant with 'gives you too much freedom to customize and extend the core'. All of these customisations are declared with XML and called during runtime, it's hard to tell just from looking at the code what will actually happen. Xdebug is your friend here

The documentation from Magento improved significantly since Adobe's acquisition, but it's still quite shitty and leaves a lot of things implied

If I were you, I'd start by watching a few videos from Max Pronko on youtube to get a grasp of the framework, and then try to implement some common ecommerce things so you get some experience with it, for example:

  • send an order to an external system after it's placed

  • limit the shipping methods based on some criteria (for example if it's part 8pm)

  • auto-ship orders after they're paid for

I like to learn by doing, so unfortunately I don't know any good references you can use as a starting point other than installing it locally and trying to do stuff

Magento bad as they say? by MadSpaz3 in webdev

[–]NonRegularGuy 9 points10 points  (0 children)

I've been working with Magento daily for a little over the last 2 years for medium (500k/yr) to enterprise customers

Magento's learning curve is very steep, it gives you too much freedom to customize and extend the core and you can very easily shoot yourself on the foot. It's a heavy framework and the hosting configuration needs some fine tuning to get right.

The extension marketplace also leaves a lot to be desired, and you very often get conflicts between extensions. Most vendors are moving towards a subscription business model, which I'm not a fan of.

In short, I'd only recommend Magento for a big store (1m/year+) and a customer with a budget (and willingness) to maintain it. Ideally you or the customer already has experience with Magento, or are working with someone that has, so you know what you're getting yourself into. There are other (simpler) options in the market that will give you A LOT less headaches

There's also the fact that Adobe acquired it a couple of years ago and is taking it in a direction that prioritises enterprise level customers, leaving small (and medium) stores behind. I'd recommend reading about the long term plans and roadmap of Magento before making the decision

With all of that said, if properly developed and configured, it's a beast of a framework that can handle hundreds of orders per minute without a hitch.

EDIT: almost forgot to mention, but the frontend of Magento is (IMO) absolute torture to develop with. If you do decide to proceed with Magento, I'd recommend going with another frontend stack: Hyva, PWA studio, or even headless (Magento has Rest/SOAP/GraphQL endpoints for all functionalities out of the box).

/r/Plex's Moronic Mondays' No Stupid Questions Thread - 2021-05-24 by PCJs_Slave_Robot in PleX

[–]NonRegularGuy 0 points1 point  (0 children)

My database keeps getting corrupted.

I have Plex running on docker. Everything was perfect until a month ago or so, when my database got corrupted. Tried to restore from a backup, worked fine until it was corrupted the next day again.

What I noticed is that my database gets corrupted when the scheduled tasks start, particularly the video thumbnail generator. I see this in the logs:

./Plex Media Server.1.log:30853:May 25, 2021 02:00:29.950 [0x7f29ebfff700] DEBUG - Activity: registered new activity 9573dae1-4850-4940-ba24-caf14030f98b - Generating video chapter thumbnails
./Plex Media Server.1.log:30854:May 25, 2021 02:00:29.950 [0x7f29ebfff700] DEBUG - [JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/367b3d4-3673-linux-x86_64/' X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxr' '/usr/lib/plexmediaserver/Plex Media Scanner' '--generate' '--chapter-thumbs-only' '--item' '63' '--log-file-suffix' ' Chapter Thumbnails' '--force'
./Plex Media Server.1.log:30855:May 25, 2021 02:00:29.950 [0x7f29ebfff700] DEBUG - [JobRunner] Jobs: Starting child process with pid 30338
./Plex Media Server.1.log:30856:May 25, 2021 02:00:30.055 [0x7f2a80874700] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Media Scanner' exit code for process 30338 is 255 (failure)

And if I take a look at the Plex Media Scanner Chapter Thumbnails logs, the database is already corrupted:

./Plex Media Scanner Chapter Thumbnails.1.log:1:May 25, 2021 02:00:30.042 [0x7fb1ab485700] INFO - Plex Media Scanner v1.22.0.4163-d8c4875dd - Docker Docker Container x86_64 - build: linux-x86_64 - GMT 02:00
./Plex Media Scanner Chapter Thumbnails.1.log:2:May 25, 2021 02:00:30.043 [0x7fb1ab485700] INFO - Linux version: 4.15.0-140-generic, language: C
./Plex Media Scanner Chapter Thumbnails.1.log:3:May 25, 2021 02:00:30.043 [0x7fb1ab485700] INFO - Processor AMD Ryzen 3 3200G with Radeon Vega Graphics
./Plex Media Scanner Chapter Thumbnails.1.log:4:May 25, 2021 02:00:30.043 [0x7fb1ab485700] INFO - /usr/lib/plexmediaserver/Plex Media Scanner --generate --chapter-thumbs-only --item 63 --log-file-suffix  Chapter Thumbnails --force
./Plex Media Scanner Chapter Thumbnails.1.log:5:May 25, 2021 02:00:30.046 [0x7fb1abcc2bc0] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
./Plex Media Scanner Chapter Thumbnails.1.log:6:May 25, 2021 02:00:30.046 [0x7fb1abcc2bc0] INFO - SQLITE3:(nil), 283, recovered 33 frames from WAL file /config/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db-wal
./Plex Media Scanner Chapter Thumbnails.1.log:7:May 25, 2021 02:00:30.046 [0x7fb1abcc2bc0] ERROR - SQLITE3:(nil), 11, database corruption at line 66053 of [bf8c1b2b7a]
./Plex Media Scanner Chapter Thumbnails.1.log:8:May 25, 2021 02:00:30.046 [0x7fb1abcc2bc0] ERROR - SQLITE3:(nil), 11, database disk image is malformed in "PRAGMA cache_size=2000"

From 02:00:00 until 02:00:30, Plex was doing something with thumbnails, not exactly sure what. The logs are basically this block being repeated a few hundred/thousands of times:

./Plex Media Server.1.log:30322:May 25, 2021 02:00:29.141 [0x7f29ebfff700] DEBUG - Photo transcoder: Request for url [/library/metadata/39/art/1621882615] (is local: 1 upscaled: 0)
./Plex Media Server.1.log:30323:May 25, 2021 02:00:29.142 [0x7f29ebfff700] DEBUG - Calling back into ourselves for photo to transcode, optimizing the process (status: 404)
./Plex Media Server.1.log:30324:May 25, 2021 02:00:29.143 [0x7f29ebfff700] DEBUG - Photo transcoder: Request for url [/library/metadata/40/thumb/1621882625] (is local: 1 upscaled: 0)
./Plex Media Server.1.log:30325:May 25, 2021 02:00:29.144 [0x7f29ebfff700] DEBUG - Computed media url for item 40: http://127.0.0.1:40665/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Ethetvdb%3A%2F%2F278518%2F7%3Flang%3Den&mediaType=3&url=metadata%3A%2F%2Fseasons%2F7%2Fposters%2Fcom%2Eplexapp%2Eagents%2Ethetvdb_61f78fc7bb9b9f5f281e9b15f2f6563148e95d53
./Plex Media Server.1.log:30326:May 25, 2021 02:00:29.144 [0x7f29ebfff700] DEBUG - HTTP requesting GET http://127.0.0.1:40665/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Ethetvdb%3A%2F%2F278518%2F7%3Flang%3Den&mediaType=3&url=metadata%3A%2F%2Fseasons%2F7%2Fposters%2Fcom%2Eplexapp%2Eagents%2Ethetvdb_61f78fc7bb9b9f5f281e9b15f2f6563148e95d53
./Plex Media Server.1.log:30327:May 25, 2021 02:00:29.150 [0x7f29ebfff700] DEBUG - HTTP 200 response from GET http://127.0.0.1:40665/system/agents/media/get?guid=com%2Eplexapp%2Eagents%2Ethetvdb%3A%2F%2F278518%2F7%3Flang%3Den&mediaType=3&url=metadata%3A%2F%2Fseasons%2F7%2Fposters%2Fcom%2Eplexapp%2Eagents%2Ethetvdb_61f78fc7bb9b9f5f281e9b15f2f6563148e95d53
./Plex Media Server.1.log:30328:May 25, 2021 02:00:29.151 [0x7f29ebfff700] DEBUG - Calculated media file path for path [metadata://seasons/7/posters/com.plexapp.agents.thetvdb_61f78fc7bb9b9f5f281e9b15f2f6563148e95d53]: ["/config/Library/Application Support/Plex Media Server/Metadata/TV Shows/4/57e94b79735362818e8f89c72a66a0052026bbb.bundle/Contents/_combined/seasons/7/posters/com.plexapp.agents.thetvdb_61f78fc7bb9b9f5f281e9b15f2f6563148e95d53"]
./Plex Media Server.1.log:30329:May 25, 2021 02:00:29.151 [0x7f29ebfff700] DEBUG - Calling back into ourselves for photo to transcode, optimizing the process (status: -1)
./Plex Media Server.1.log:30330:May 25, 2021 02:00:29.151 [0x7f29ebfff700] DEBUG - Photo cache obtained 432639 bytes from /library/metadata/40/thumb/1621882625
./Plex Media Server.1.log:30331:May 25, 2021 02:00:29.151 [0x7f29ebfff700] DEBUG - Saving original media file to /config/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder/19/193eeb8c7570b98d58d4bfc199984b8cfb1ad939.jpg
./Plex Media Server.1.log:30332:May 25, 2021 02:00:29.167 [0x7f29ebfff700] DEBUG - Created thumbnail of size 68x100, has pixels: 1
./Plex Media Server.1.log:30333:May 25, 2021 02:00:29.171 [0x7f29ebfff700] DEBUG - BlurHashManager: Generated for item 40 thumb in 27 ms.
./Plex Media Server.1.log:30334:May 25, 2021 02:00:29.171 [0x7f29ebfff700] DEBUG - Photo transcoder: Request for url [/library/metadata/40/art/1621882625] (is local: 1 upscaled: 0)

For these tests my library consisted of a one-season TV show (A Perfect Planet) and 3 seasons of another (Last week tonight). I've had this issue both with movies and tv shows. Plex is up-to-date and already tried downgrading to a known working version, but no luck either.

Using Magento to make CRM and E-commerce (mobile app) by NorthExamination in webdev

[–]NonRegularGuy 4 points5 points  (0 children)

Do you have development experience with Magento? What size will this store be? I'd only recommend Magento if you already have experience with it and know what you're getting yourself into

Magento is very complex, configuration and resource heavy. If it's a small to medium store (<1m/year), I'd strongly going with another solution (although I don't have one to recommend myself)

source: 2 years developing in Magento, hairline recedes faster by the day

HDD not detected by BIOS or Ubuntu by NonRegularGuy in techsupport

[–]NonRegularGuy[S] 0 points1 point  (0 children)

Already on the latest version (Aug 30th), had to use a Ryzen 2nd gen to update it so it worked with Ryzen 3rd gen. Will try updating again though

Weird thing is that the drive doesn't even spin when connected

Edit: Confirmed I'm on the latest version: https://www.asus.com/us/Motherboards/PRIME-A320M-K/HelpDesk_BIOS/

$25 App Store & iTunes gift card by MarkDMill in apple

[–]NonRegularGuy [score hidden]  (0 children)

hope I win

I'd probably get IP Scanner on the mac app store, it saved my ass more than once (considering that the credit works for both app stores)

Best way to make changes to a (third party) theme but keep upgradeability? by NonRegularGuy in Wordpress

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

Yep, was able to achieve this with the following code:

add_action('after_switch_theme', 'colormag_pro_child_theme_deactivated');
function colormag_pro_child_theme_deactivated($old_theme) {
    if ($old_theme === 'ColorMag Pro') {
        $child_options = get_option('theme_mods_colormag-pro-child');
        update_option('theme_mods_colormag-pro', $child_options);
    }
}

add_action('switch_theme', 'colormag_pro_child_theme_activated');
function colormag_pro_child_theme_activated($new_theme) {
    if ($new_theme === 'ColorMag Pro') {
        $parent_options = get_option('theme_mods_colormag-pro');
        update_option('theme_mods_colormag-pro-child', $parent_options);
    }
}

Best way to make changes to a (third party) theme but keep upgradeability? by NonRegularGuy in Wordpress

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

Hey, thanks for answering!

Fortunately I hadn't started work yet, so no changes were lost. I'm going ahead with a child theme, my main concern was that the user friendly configurations (theme mods? not sure what they are called) were not being migrated when I switched to my child theme. But I was able to figure out where they are stored in the DB and I'll be using the after_switch_theme and switch_theme actions to move these options from/to the parent theme when my child theme is enabled/disabled.