Skip to content

u/beef-ox

In this archive from Mar 2019 to Sep 2025

0
posts
93
comments
0
media
342
score

Top comments

I see a lot of people who are confusing mysqli with the old mysql_ functions which WERE deprecated.

For practically everyone here, mysqli replaced the old mysql_ functions and includes prepared statements and the option of using as class or as standalone functions. PDO is still preferable because of its flexibility, but the only major advantage to PDO over mysqli is that PDO supports named placeholders in prepared statements while mysqli only supports the “?” for placeholders.

Stop spreading misinformation. mysql_ != mysqli_

95 points

😂

I don’t know why. He’s an older programmer who prefers as many things as possible to be written in Perl and croned.

He refused to use git forever and still doesn’t trust it—he still copies and comments out lines of code when they change, in addition to copying files he changes to ../backup/YMD/file_name.old.php or to /file_name.YMD.php;

He got mad when I gave him an account on all the machines and told him we shouldn’t have a root ssh key—he still sshes as root to this day despite the CEO and I telling him repeatedly that the root accounts shouldn’t be used. He doesn’t like sudo. He uses the default color scheme of VI with no plugins and mouse mode off... but relies heavily on notepad++ for heavy lifting.

he has a script which he refuses to turn off that backs up the entire code directory to a zip file every night and mysqldumps to a zip file every night as well— this locks up the database regularly and even corrupts tables often enough that I check for overhead every morning looking for tables to repair. in addition, these are written in Perl even though they only issues shell commands and very well could be a simple bash or POSIX script if it was even necessary. We’ve gone through so much storage doing this. Oh and everything is logged to files which he saves indefinitely—there’s logs from 2007 on the internal servers.

We have multiple servers on the same internal network, but instead of centralizing and querying each server directly, he dumps tables with OUTFILE (Perl scripts) copies them over FTP, and loads them INFILE (also Perl scripts) at the destination. This is all croned. In this process, which happens multiple times daily, data is loaded into temp tables, the live production tables are dropped, and then the temp tables are renamed. Since this is all croned, there are points in time where there’s data just missing and things don’t work.

He doesn’t like when I use heredoc to syntax highlight—specifying that a solid-color string is superior, nor does he like it when I format things on multiple lines and aligned for readability, positing that each string variable should be one long ass string that wraps around however many times or should be concatenated with .=

He always uses echo to output html, css, and js. Even when there’s no PHP logic, he usually uses echo if it’s within a .php file. He’s not a fan of when I escape PHP to do large blocks of HTML. He loathes it when I write classes instead of procedural or functional code. He doesn’t like to use name spaces and doesn’t trust autoload over require_once

He hates when I do things in JavaScript using Ajax instead of having the entire page hit the database loading all the same data every time a button is pressed or an interaction occurs. He relies heavily on pop ups to do things and isn’t a fan of modals. He says MyIsam is better than InnoDB, we can’t use NGinX, or Percona, and everything is Latin1 instead of UTF8mb4. There’s encoding problems alll the freaking time.

But he’s been with the company for ~15 years. His croned Perl scripts are the backbone of a large percentage of the business, and they moved the company from $1M to $200M /y over time. He’s a nice guy and works hard. I’ve only been with the company for 3 years and I’m young and “inexperienced.” The general attitude is that I haven’t been around long enough to understand the reliability and importance of doing things this way. But honestly, if I was in charge of the programming department, everything would be quite different than it is now. For certain, this isn’t the best way to do things.

14 points

Well, there’s several ways I can think to go about it.

The first thing, Linux is just files. Dumping the contents of those files onto a system with the same partitioning scheme will “just work” (minus some drivers that you might have to install for any hardware not handled within the kernel itself, but if you’re using Arch, you should be familiar with that already). With that in mind, you can just create your partitions and dump the files in place. If you use LVM, ZFS, or BTRFS, the whole file system is virtualized anyway, so it’s just a dump and go operation.

With that in mind, you can always use a tool like CNCHI as seen in Antergos and RebornOS installers to do the base install and copy your files over

You could also create a git repo with your home dir the way you and include a script with the pacman commands to install your desired packages that you can run as soon as you git clone

You could also, if starting from scratch, just turn your bash_history up really high, do all your setup in the cli and then save the history to a .sh file with the bash shebang at the top and run the script on a fresh install to get back where you were.

You could go the same route as distro makers do and turn a live environment, such as Antergos, into the environment you want your system to resemble and copy that over

This is Linux. There’s a lot of ways to skin a cat.

13 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.