AboutSelf employed developer, educator, and Japanese linguist
SkillsPHP, JS, some C, various old BASIC dialects...
Joined devRant on 2/19/2017
Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Cleaning up my desk at the office today. As I'm sure is the case with most of us, I have a draw that's full of old technical crap that's not currently in use (mice, charging cables, USB hubs, routers, access points, cameras, old phones and iPads, you get the idea).
Found out that not only do I have an extra Mini-DVI to HDMI dongle; I apparently have 3 of them. That's more than I've got available Mini-DVI ports to begin with.1
When you’re rebuilding a major project and find a CoTS solution that you didn’t think to look for when starting the project 2 years ago...
Well, lessons learned in a lot of ways here...
Teaming up with a marketing firm looking for a developer. The owner was showing me a couple samples of Craigslist postings that he gets sent every day by a filter he has set up so that I can provide some feedback on what would be a good fit.
Second listing we pull up looks reasonably good at first, then I notice this bit at the bottom:
“Must be available to do design review calls where we’re both on the phone, I tell you what needs to be changed, and you do it on the spot.”
Politely but firmly let my new friend know that that right there was a big red flag saying to move on.
Anyone else have helpful criteria when trolling these kinds of postings?
Another rant reminded me of one of my dad’s favorite sayings about experience...
Some people have ten years of experience. Others have one year of experience repeated ten times.
..and for ohers, the recursion interval is shorter still...
As a bonus, here’s another personal favorite: “Nobody’s completely useless. They can always be used as a bad example.”1
Don’t really put stickers on my laptop, however the rectangular DevRant one has done a great job marking my primary external USB drive since I got it...
For those who speak some Japanese and want to expand their skill set a bit, I found a great introduction to PHP in Japanese a few months back, and have been reading through it primarily with the purpose of learning programming vocabulary and figuring out how to express concepts properly from a grammatical standpoint.
If anyone's interested, here's the link: https://www.javadrive.jp/php/
Scroll down the page for an index of topics.7
Working on a new payment gateway for one of my customers, and it turns out that instead of just specifying the parameters for what to include in the API call they want you to use their drop-in module for it...which is still written in PHP 4 and hasn't been updated since 2011. Also turns out that they only accept data formatted in XML.
Not insurmountable, but more than I feel like dealing with right this moment...7
So, my car's odometer finally rolled over to 100,000 here a couple weeks ago. Been having fun watching it hit various binary values again (100001, 100010, etc.).
Not exactly wrong there. I got started at 10 with odds and ends for fun.
Took a semester of it in college before switching because the compiler and I didn't get along.
Only to pick it back up via self-study 10 years later because the programmer who came on board for a side project never showed up and I wanted to keep things moving.
10 years later still, I'm now running a web design shop full time.
Accepted a feature request that practically doubled the workload without asking for more money, on account of trying to be fair to a customer who was working through a translator.
Only to get stiffed on 3/4 of the money agreed to in the first place.
Only saving grace was everything was on my servers, so I took him down for non-payment.1
Quick Plesk config question...
Been getting open_basedir() notices in the WordPress logs, and frankly it's flooding the log right now. Sample below:
[24-Feb-2019 07:05:19 UTC] PHP Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/webspacedomain.com/SiteInstallDirectory/wp-content/db.php) is not within the allowed path(s): (/var/www/vhosts/webspacedomain.com/:/tmp/) in /var/www/vhosts/webspacedomain.com/SiteInstallDirectory/wp-includes/load.php on line 397
Checking the settings for open_basedir in the domain's PHP settings, it's currently set to the following default value:
By my read, that **should** be granting permission to the directory. I just checked it against the setting on the dev server (which doesn't report this error), and it's configured in the same manner. Only difference between Dev environment and this one is that the one in Dev is in vhosts/webspacedomain.net/DEV instead of just vhosts/webspacedomain.net
Is there something I'm missing here?4
Getting ready to finally launch a WordPress Multisite project I've been working on for over a year this weekend...and version 5.1 drops today.
And has significant additions in Multisite functionality that I should implement prior to launch while it's comparatively painless, rather than when we've got a bunch of sites with data to reconfigure.
Have some downtime today, so since I lucked out and found some old backups (from before I used Git) of a project I was planning on revisiting, I decided to fire it up and see what I can do to get that going again.
And discovering just how much my coding style has changed since then...
[Code is in PHP, for reference]
* Virtually no documentation (whereas my current style is near-obsessive with PHPdoc blocks)
* Where comments exist, they only use // and are a full tab after the end of the line
* All assignment operators are dutifully aligned on tabs
* Have to update the entire codebase because it relies on deprecated `mysql_*` calls
* Have to flip all of the quotes throughout the codebase because I used double-quotes as my primary at the time instead of single quotes.
* Also relied on magic quotes for injecting variable content into strings
* Associative array practices varied; sometimes the names are encased in double quotes, but I just hit a block where it's all leaving it to the compiler to interpret unquoted string literals
And perhaps the most egregious so far...
* Any time we get database results back the process for cycling through them is to do `$count = mysql_num_rows($result);` (or $count2, etc.), then do a `for ($i = 0; $i < $count; $i++)` (again, or $j, $k, etc.), instead of just a simple `while ($data = $result->fetch_assoc())`2
Silly question, but why is it that in this age of 64-bit computing and gigabytes of RAM applications still have trouble with text files/SQL dumps over 1MB in size? Surely for something so simple it should be able to store it all in memory without any issues, no?11
Met someone recently whose goal with their business is to be an “idea person”. Basically, they’d look at your business, suggest an idea, and it’d be so good you’d pay them for it and go on to the next idea.
Spent the next 15 minutes explaining that
1) Ideas without implementation strategies are cheap (on the order of free if it’s something you can completely express in a sentence or come up with after a superficial observation)
2) You need to bring more to the table than just what other people are already thinking if you want people falli g over themselves to pay you for your thoughts7
Just spent 4 hours working on a somewhat complex restructuring of my current project that, when boiled down totals about 50 new or modified lines.
While I realize that line count != productivity, all the testing and reworking over that period has me feeling like there should be more to show for it.
But then, there's the fact that it's working properly as it's supposed to now, so I guess it's a win in the end.1
On the one hand, I'm done with all of the major bugs in a piece we're getting ready to launch this month.
On the other hand, there's one lingering bug that only appears when I've got Query Monitor running, because WooCommerce throws a false positive "table does not exist" error, which it tries to backtrace through **39** layers of functions, eating all of the memory.
Turning off Query Monitor fixes this, but means I basically have to flip it off before the primary function of the software and flip it back on afterward.
Currently considering the best way to put off the WooCommerce activation for a point where there isn't so much going on...
Ascended Anime Nerd
Got started with Dragonball Z when it first came stateside. Brother was borrowing fansubs of the Cell and Buu sagas back when people were wondering if Goku would ever finish Snake Road.
Around that time I started noticing some serious discrepancies between the broadcast translations and the fansubs, and so I decided to cut out the middleman—after all, how hard can it be to learn Japanese?—and did a search on AltaVista for a “kanji course”, turning up a course hosted by Rice University that taught basic Japanese using Magic Knight Rayearth and YuuYuu Hakusho.
Turns out the answer to the difficulty question is that anything van be simple to learn, if you don’t know it’s supposed to be hard. Especially if you embrace the parts everyone else dreads (falling in love with kanji, in my case).
Over the next nine months I ditched my Spanish class—and all my other classes, for that matter—to study Japanese in the computer lab. I was reviewing the lessons, playing JRPGs on SNES9X (stored on a ZIP disk, since every computer in the lab had a ZIP drive), and transcribing the scripts so I could transliterate and translate them thereafter. In a lab that went so far as to uninstall Minesweeper and Solitaire to discourage playing games on school computers, I had free reign to do so openly because the one time I got confronted for playing a game I had 150+ leaves of handwritten transcriptions to show them.
Long story short, by the time I took Japanese 101 9 months later it was like Hermione in Snape’s potions class, since I had already taught myself about 2 years’ worth of material. I then transferred out to a college that did a one-class-per-month “modular” system that basically allowed me to take 8 more Japanese classes full-time for the following year. By the time my exchange trip came up I was sofar ahead of the curriculum I was taking classes alongside the native Japanese students.
Running out of linguistic topics, I did an independent study on classical Japanese literature in its original, unmodernized grammar and orthography. A topic I’m still fairly active with 15 years later.3
Something of an ongoing thing, but the past few days in particular my hands and wrists have been demanding I stop what I'm doing every minute or so to flex, stretch, and otherwise strain just about every joint in them. Not sure how to describe it other than that they find not doing so *extremely* irritating. Probably the accumulated effect of spending the last 10 years almost continuously at a keyboard of some sort.
Anyone else experience this and have any suggestions on how they deal with it? It sometimes disappears once I really get into the flow of what I'm doing, but it's making it much harder getting to that point in the first place...2
Had an interview with a potential customer last week, and he started questioning my technical capability in the middle of the discussion on the basis that I’m taking notes with pen and paper...
Yes, I can type. At 90+ WPM, I can darn near produce a transcript of everything we say. But I won’t remember any of it afterward, because it passes straight from the ears to the hands without any processing.
“You see, that’s what we have something called ’search’ for...”
...Yeah. Except that doesn’t help with picking out the most important points from a wall of text, organizing it in a way that allows visualizing relationships between concepts, and other non-linear things that are hard to do on the fly in a word processor.
“Well, how about we get you a tablet with a pen and you can just write on that, then?”
How about no.
Ended up turning him down because of other concerns that were raised that were, suffice to say, about as ornerous as you might expect from that exchange.8
Had a handful of extra eyeglass wipes that someone gave me a week ago, so for lack of anything better to do while waiting on an OS install, I decided to give my laptop screen its only serious cleaning in the 6 years I've had it.
20 minutes later and it's already gotten its first fingerprint because I wasn't thinking and tried to wipe off a speck of dust.
I'm starting to remember why I stopped caring...1
Just spent 8 hours debugging an issue that had been sitting in my issue queue for a week. WooCommerce was claiming transactions were failing, but going through in the background anyway.
Can’t share any more specifics here, but the gist of it is that the server the code was developed on was set to PHP version 7.1, while the server the dev site was on was set to version 5.6 (which I didn’t even think was still installed, never mind the default...).
So yeah, fun times over a trivial fix.1
Another one someone reminded me of when mentioning !important...
When I first started trying to figure out how to customize Wordpress and spent a week trying to figure out how to defeat its reformatting of my styling preferences when editing posts, only to throw it in the corner and ignore it for the next four years.
Spending half a day wondering why certain DIVs refused to appear in a custom theme I was building, only to find out the reason why was because AdBlock had blocked the IDs being used.
Have kept AdBlock turned off on my primary dev machine ever since.4
Need to whip up a quick demo on how a site might work for an organization, so I figured I'd just use the default twentynineteen theme and customizer to get it set up.
Turns out that twentynineteen *does* *not* *have* sidebars.
Instead, all of your content is offset to the left.
And all right-floated boxes go off-margin to the right.
And this is apparently a *feature* because now you can change your sidebar on every damn page instead of setting it in one place like a good site design would dictate! (link: https://github.com/WordPress/...)
I've been trying to bite my tongue and give it a fair shot, but saying that having the only dedicated widget area in the footer and forcing you to rebuild your sidebar on every damn page you want it on is a good thing is beyond the pale stupid. If you need that level of customization on every page, you don't know what you're doing. At the very least include a sidebar and give people the option of overriding it.
And for the love of God, *don't throw the entire goddamn body content off-center claiming you're leaving space for a sidebar you're not going to provide*!2
Been working on trying to get JMdict (relatively comprehensive Japanese dictionary file) into a database so I can do some analysis on the data therein, and it's been a bit of a pain. The KANJIDIC XML file had me thinking it'd be fairly straightforward, but this thing uses just about every trick possible to complicate what one would think would be a straightforward dictionary file:
* Readings and Spellings/Kanji usage are done in a many-to-many manner, with the only thing tying them together being an arbitrary ID. Not everything is related, however, as there can be certain readings that only apply to specific spellings within the group and vice versa. In short, there's no way to really meaningfully establish a headword fora given entry.
* Definitions are buried within broader Sense groups, which clumsily attach metadata and have the same many-to-many (except when not) structure as the readings/spellings.
Suffice to say, this has made coming up with a logical database schema for it a bit more interesting than usual.
It's at least an improvement over the original format, however, which had a couple different ways of setting up the headword section and could splatter tagging information across any part of a given entry. Fine if you're going to grep the flat file, but annoying if you're looking for something more nuanced.
Was looking online last night to see if anyone had a PHP class written to handle entries and didn't turn anything up, but *did* find this amusing exchange from a while back where the creator basically said, "I like my idiosyncratic format and it works for me. Deal with it!": https://sci.lang.japan.narkive.com/...
Grateful to the creator for producing the dictionary I've used most in my studies over the years, but still...5
My 2013 rMBP's battery just died at 56%, even though iStat reports that the health is still at 75%. May have to take it in to the shop for a new battery soon...5
Would it be possible to allow the iPad app to rotate? I only ever use it in landscape unless forced, because my typing speed and accuracy take a nosedive with the smaller keyboard...2