I've been doing some web programming lately, and it got me thinking. When I did my first web site, I just had to learn one language - HTML - and it was pretty straightforward. Today, you basically need to know 5 different, unique programming languages:
HTML - to structure the content of the page
CSS - to control the appearance of the page
JavaScript - to interact with the reader on his "device"
PHP (or Java, Python, Ruby, etc.) - to generate the page on the server
Yep to all of those technologies. Same here. And I thought learning Spanish was complicated! Not compared to some web and computer languages.
Here's a fer instance of something I did earlier today.
The problem:
Bingbot was misindexing my blog articles. It left off the actual folder where the blog is published, resulting in hundreds of 404 Not Found errors. This is hilarious since it was trying to index files it already knows exist! It just had the wrong starting paths.
Solution:
Experiment in a test folder on the server until I figure out the right codes to redirect the bot up one directory. It took me quite a while to get it right: 15 minutes.
This simple application of Regular Expressions inside a 301 permanent redirect rule solved the problem and is now letting this misguided search engine verify the existence of the articles it was looking for in the wrong place. Anybody could do this, right?
To some, this may look like black magic from the Dark Web. In reality it is just a normal web programming language called Regular Expressions, wrapped inside what is known as a "redirect directive," inside a special control file known as .htaccess
Funny, I was just reading about Google employees today, and what they actually do at work. They have to know all those languages you mentioned, b0b, plus they have to have an aptitude for “abstract mathâ€. And the kicker —- “We are looking for a certain personality type†—- without actually explaining what that personality type is. On a different website, an employee described some of the daily routine an $80k Google guy can expect, which included a trip to their own coffee bar and a mid morning YouTube session watching panda bears do forward rolls.
Fred Treece wrote:Funny, I was just reading about Google employees today, and what they actually do at work. They have to know all those languages you mentioned, b0b, plus they have to have an aptitude for “abstract mathâ€. And the kicker —- “We are looking for a certain personality type†—- without actually explaining what that personality type is. On a different website, an employee described some of the daily routine an $80k Google guy can expect, which included a trip to their own coffee bar and a mid morning YouTube session watching panda bears do forward rolls.
Don't underestimate the value of pandas doing forward rolls. 🼠😉
Carter D10 8p/8k, Dekley S10 3p/4k C6 setup,Regal RD40 Dobro, NV400, NV112 .Playing for 53 years and still counting.
Regular expressions {{{{shudder}}}}. I never learned that language, but it's all over the place the phpBB code. I recently had to decipher this line, a mix of PHP and regex:
b0b wrote:Regular expressions {{{{shudder}}}}. I never learned that language, but it's all over the place the phpBB code. I recently had to decipher this line, a mix of PHP and regex:
I now understand what it does, but I still don't know what the '\\3' actually means. Wiz?
b0b;
I'd only be guessing what the \\3 means. Because it is quoted and separated from the other expressions by commas, it is part of an equation and is a variable, or represents a variable's position.
As a RegEx, a backslash is used to escape a literal. The literal is probably \3. The additional backslash escapes that identifier. It might indicate 3 items in a line of input to keep the RegEx engine from continuing processing forever.
The entire expression deals with User ID and a Signature existing or not existing.
The lack of comments in phpBB code really irks me sometimes. Someone once told me, "When you solve a problem with a regular expression, you end with two problems - the original one and the regular expression."
I made my career being an expert in VRML of all things. Do you remember Virtual Reality Modeling Language Bob?
In the 90's my actual, on the card, title was VRML Evangelist for SGI.
Those were some fun, fun times. Nothing better than being part of the most hedonistic, coolest, company on the planet at the birth of the 3D and Internet industries and living in Silicon Valley....
Hedonistic companies in Silicon Valley?? I grew up in Silicon Valley. Worked for Corvus and Apple in the 80's doing early networking. Corvus was definitely the most hedonistic. Beer on tap 24 hours a day in the cafeteria. Lots of "breaks" to the parking lot.
By the time I started with Apple in 1986, the world was moving on from beer and "breaks" to lattes and smoothies.
I survived the 80's, barely. I must never forget how messed up a lot of that was.
b0b wrote:Regular expressions {{{{shudder}}}}. I never learned that language, but it's all over the place the phpBB code. I recently had to decipher this line, a mix of PHP and regex:
I now understand what it does, but I still don't know what the '\\3' actually means. Wiz?
And that's the rub with regular expressions: reverse engineering them if you don't live and breath that language is a pain in the butt. There are plenty of books on composing regular expressions, but I haven't seen one that teaches you how to quickly read them. If you're like me, and bump into them only occasionally, it can be painful. I'm not knocking their usefulness, just whining about how unintuitive that language is.
- Slim
Chromatic Harmonica, Guitar, and Pedal Steel (Williams U12 Series 700, Emmons lap) http://slimandpenny.com
FYI, Writing and testing Regular Expressions is tedious. So, i use a program that matches regular expressions to text. It is known as RegEx Match Tracer. The last version was 3.x, published in 2013. It still works for me!
An expert on phpBB Refugees attempted to explain to me what the '\\3' means. I still don't quite get it. Makes me wonder if there's an easier way to do it. Probably not.