Brink (@_brinked) header
Brink (@_brinked) profile picture

proud owner of a jQuery laptop sticker

Joined September 2022
Photo by Brink (@_brinked)Photo by Brink (@_brinked)Photo by Brink (@_brinked)Photo by Brink (@_brinked)Photo by Brink (@_brinked)Photo by Brink (@_brinked)Photo by Brink (@_brinked)Photo by Brink (@_brinked)Photo by Brink (@_brinked)Photo by Brink (@_brinked)
*paws at you* do u hab games on ipad *paws at you* do u hab games on ipad *paws at you* do u hab games on ipad *paws at you* do u hab games on ipad
1
3
32
"GPT 5.5 was better on medium than xhigh"
23
Working with Astra be like: [ Loaded 7 tools, read 25 files, ran 30 commands ] "Ok we have everything we need, starting implementation now" [ Compacting Context ] < 5 minutes later > [ Loaded 7 tools, read 8 files, ran 13 commands ] "Ok we have everyth.." [ Compacting Context ]
17
One of those things China is now is Capitalist, hence "failed communist". Cmon bud you love China's success, tell us how Capitalism helped pull it out of it's third-world power status nitter.gq/Biyombonesaw/status/21…
unavailable
11
The situation is so crazy that like more than half of the posts on Hacker News are about actual hacks
49
one must consider whether the great chinese firewall does more good by protecting the rest of the world from chinese shitposters than it does harm by keeping them contained & docile
1
70
The music industry should be brave & revoke rights to a new banger melody if the song it's in is bad enough. "hmm no thank you for your contribution Coldplay but we're gonna give this to someone who deserves it"
1
78
they count these as sick days btw
Instead of calling in sick, I’m going to call in healthy. I’m not coming in today. I feel really good and I don’t want to waste it on work
47
Just spoke to an insider in the current admin who requested anonymity to discuss sensitive information. They said Hi
2
50
We know cats don't invent time travel since Bose & Sony still make noise-cancelling headphones
35
If they can't fight a war without resorting to war crimes/crimes against humanity then they shouldn't launch terror attacks into Israel to begin with.
3
12
744
to the genius who replied then blocked me: they certainly weren't shooting armed soldiers when they invaded Israel on Oct. 7 & for decades before that when they were launching unguided rockets at civilians in Israel
1
1
104
I can do this to the human brain too if anyone was actually brave enough to sign the required liability release forms
You can flip two bits in an LLM’s head and it starts fantasizing about killing you.
1
45
2019 was 3 years ago
1
16
scientists announce the BYE
3
40
In the age of AI the ability to cultivate taste will be more important than ever. If you're not able to correctly judge design/dev work like this at first glance then you're ngmi
73
I can do much, much worse. Let's talk about the wonderful world of functions in WordPress. Function Names the_title() prints the post's title. get_the_title() returns it. Makes sense. Add "get_" and you get the value back. Except the_title() can return too, if you call it like the_title('', '', false). Why would you do this over just calling get_the_title()? Good question, moving on. the_permalink() prints the post's permalink. get_permalink() returns it. Where did "the" go? Doesn't matter. WP later added get_the_permalink() too, so this is one of the few cases where a naming inconsistency was actually addressed. This will be the last time this happens. the_content() prints the post's content. get_the_content() returns the content as a string, minus the filters that render shortcodes and blocks, so the printer and the getter give you two different results. the_date() prints the post's date. Except if the previous post in the current query loop was posted the same day, then it prints nothing. get_the_date() always returns the current post's date. get_the_tags() is plural, and returns an array of WP_Term objects. get_the_category() is singular, and returns... also an array of WP_Term objects. is_email() returns the given email string when it's valid and false when it's not (rather than just returning true). is_home() returns true on the site's generic post index page, not the site's home page. is_front_page() returns true on the site's home page. is_admin() checks whether the current request is for a WP dashboard page. The logged in user's role never comes up, let alone checking if that user is an administrator. is_super_admin() actually checks if the logged in user is an administrator (has never been a "super administrator" role). sanitize_title() doesn't sanitize a title, it turns it into a slug. check_admin_referer() doesn't check a referrer, it checks a nonce. wp_localize_script() is used to pass PHP data to frontend JS, it's almost never used for localization. wp_get_current_user() has a "wp_" prefix. get_current_user_id() doesn't. This one makes sense because get_current_user() is already a PHP built-in function unrelated to WP. This is (probably) the only time a "wp_" prefix will have a good excuse to exist, for the rest of this post they'll be completely arbitrary. wptexturize & wpautop do not use typical prefix names. Don't ask why. Function Returns Many functions return either false, 0, or a WP_Error object to indicate failure. There is barely any rhyme or reason to when this happens. For example: wp_insert_post() returns the created post ID on success, or the int 0 or a WP_Error object on failure. add_post_meta() returns the created meta ID on success, or false on failure. get_template_directory() gives you the current theme's directory. Except if it's a child theme (a theme that relies on another "parent" theme), then it gives you the parent theme's directory instead. get_stylesheet_directory() gives you the current theme's directory even if it's a child theme. Both parent & child themes have templates & stylesheets. get_header() returns nothing. It just includes a theme's "header.php" file (if it exists). Same with get_footer(), get_sidebar(), and get_template_part() with their own related theme PHP files. Function Parameters PHP did not have named parameters, only positional ones until PHP 8.0. This meant in the worst cases that functions like get_links() would look like this if you wanted them to return the string rather than print it directly, but otherwise wanted the default behavior (the last parameter is the actual "$display/return" parameter): get_links(-1, '', '<br />', ' ', true, 'name', true, false, -1, 1, false) (this function was deprecated, but is still callable/functional) WP fixed this at the time by making most functions accept a key/value array parameter where you could set specific named parameters clearly and would otherwise get defined defaults. This generally went fine but various parameter values were not implemented cleanly, e.x: get_search_form() and wp_nav_menu() print by default, you have to pass array('echo' => false) to have them return instead of print. wp_get_archives() and wp_list_categories() do the same thing but you have to pass array('echo' => 0) this time. get_calendar() and the_title() still use positional parameters for their "$display/echo" option. get_the_terms(post, taxonomy) takes the post first. has_term(term, taxonomy, post) takes it last. There are countless examples of weird inconsistent parameter placement like this. I can go on. There's so much more to talk about when it comes to WP. (All of the things I discussed above are still present in the latest WP version)
In honor of the critical PHP vulnerability affecting most internet websites, I feel it is worth acknowledging that humans are bad at software and you can do a lot worse than vibe coding. On PHP function naming;
101
AI being used for hacking feels like the start of COVID did
2
2
243
Tone tags were such a good idea, we need to bring them back & popularize & normalize them. It'd prevent a huge amount of stupid misunderstandings
1
252
Your honor, what part of a "No Solicitors" sign doesn't make it CRYSTAL CLEAR that ringing the doorbell pulls the trigger of a loaded Barrett M82 rifle setup on a tripod aimed at the front door??
62