Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Chrome has had great support for multiple user accounts for a while, too. At work, I usually have a work user with my work email and my personal account with all my synced bookmarks and whatnot.

RPATDO_LAMD posted:

"this" is pretty fucky in JS, isn't it? I don't know much about the language, but is it possible that a code change somewhere else in the project altered the context in that logging function? this.print() is calling window.print() now but perhaps it was intended to be someobject.print().

I worked on a front-end project one time where some code path entry points were strict mode and some weren't. Gosh those were some fun bugs.

Arsenic Lupin posted:

Putting search in the URL bar was revolutionary.

... when Opera did it in 1996?

Adbot
ADBOT LOVES YOU

lobsterminator
Oct 16, 2012




Munkeymon posted:

Chrome has had great support for multiple user accounts for a while, too. At work, I usually have a work user with my work email and my personal account with all my synced bookmarks and whatnot.

Firefox containers are almost there, but not quite. You can set a site to always open in a certain container, but you cannot make a bookmark that opens in a certain container.

If Firefox implements a way to bookmark, say Gmail, to open in either your personal or work account, it will be great.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

lobsterminator posted:

Firefox containers are almost there, but not quite. You can set a site to always open in a certain container, but you cannot make a bookmark that opens in a certain container.

If Firefox implements a way to bookmark, say Gmail, to open in either your personal or work account, it will be great.

There's an extension for that, but keep checking if it works because in my experience container-related extensions have a pretty short shelf life.

NtotheTC
Dec 31, 2007


Thermopyle posted:

Welcome to every issue page with any sort of profile on a popular package ever.

+1

OddObserver
Apr 3, 2009

100 me toos isn't the worst --- it sure beats 100 comments describing half a dozen vaguely similar in symptoms but totally different in root cause reports all on the same ticket, complete with well-intentioned attempts by third parties to diagnose them that sadly do not have the familiarity with the codebase to match their desire to be helpful.

Xarn
Jun 26, 2015

OddObserver posted:

100 me toos isn't the worst --- it sure beats 100 comments describing half a dozen vaguely similar in symptoms but totally different in root cause reports all on the same ticket, complete with well-intentioned attempts by third parties to diagnose them that sadly do not have the familiarity with the codebase to match their desire to be helpful.

+1

Goreld
May 8, 2002

"Identity Crisis" MurdererWild Guess Bizarro #1Bizarro"Me am first one I suspect!"

Factor Mystic posted:

IE8 did had multi process browsing, which was before chrome was released, not that it matters or that anyone cares

My opinion is that the biggest mistake Microsoft did to turn off people to IE had nothing to do with functionality.

It was because the browser defaulted to the lovely horror of the MSDN website, while Google defaulted to their search page. It never occurred to them that defaulting to a website with a minimal payload might, just might provide a better experience than slamming your computer with 50 MB of godawful ads just for some marginal click through revenue.

Most of my family doesn’t even know you can change your home page, and I’d bet the average web user doesn’t know either.

MrMoo
Sep 14, 2000

A better dev process could have taken that and gone to a better place. Microsoft’s inept testing strategy and idk time playing ping pong or something, instead of using their software, noticing it is bad, and actually improving it.

Jazerus
May 24, 2011


Goreld posted:

the MSDN website

inflicting msdn on users would have been exceptionally cruel even for microsoft

Dirt Road Junglist
Oct 8, 2010

We will be cruel
And through our cruelty
They will know who we are
So this is fun. Apparently there's a bug in Defender where it tries to scan its own quarantine dirs, which then gets it caught in a 100% I/O loop that locks everything up to the point of unusability for as much as 10-30 min at a time.

And apparently it's a known issue.

Thanks, Microsoft!

Jaded Burnout
Jul 10, 2004


Working on a new client's project. Their current coder feels that automated tests are a waste of time. "I'm the only one working on the app so I'll know what might break when making a change". I immediately found a bug that allowed non-admins to see any admin-only page just by going to the path. There were no tests making sure it worked.

At least we're not working straight in production, right?

quote:

Is there a staging environment?

quote:

no
we had one for the old app, but for this one, I didn’t bother. Until there are enough customers to cause a problem if poo poo hits the fan, it doesn’t worth spending the time on it :slightly_smiling_face:

:sigh:

The thing is, people like this think they're being efficient and effective, they think they're cutting through red tape and unnecessary process, but it's all built on a foundation of arrogance in thinking they can understand the ramification of every change. Just write the loving tests.

Jaded Burnout fucked around with this message at 09:11 on Jul 2, 2019

canis minor
May 4, 2011

This reminds me what I caused exceptions by clicking browser back button.

edit: to clarify - simple thing like tests would have helped there, but yeah...

canis minor fucked around with this message at 17:51 on Jul 2, 2019

Arsenic Lupin
Apr 12, 2012

This particularly rapid💨 unintelligible 😖patter💁 isn't generally heard🧏‍♂️, and if it is🤔, it doesn't matter💁.


A small oops in a home-security lock

quote:

Dardaman and Wheeler began looking into the ZipaMicro, a popular smart home hub developed by Croatian firm Zipato, some months ago but only released their findings once the flaws had been fixed.

The researchers found they could extract the hub’s private SSH key for “root” — the user account with the highest level of access — from the memory card on the device. Anyone with the private key could access a device without needing a password, said Wheeler.

The later discovered that the private SSH key was hardcoded in every hub sold to customers — putting every home with the same hub installed at risk.

OddObserver
Apr 3, 2009

canis minor posted:

This reminds me what I caused exceptions by clicking browser back button

Back buttons pretty much are a coding horror of their own on the browser end, too, since the full back button experience involves basically saving the entire world (which is kinda.. memory hogging) or you can emulate and save some form state and stuff which is liable to confuse JS.

See e.g. Chrome design doc on switching to option A from option B:
https://docs.google.com/document/d/1YrBKX_eFMA9KoYof-eVThT35jcTqWcH_rRxYbR5RapU/mobilebasic#heading=h.u0zgxzla5xbx

canis minor
May 4, 2011

This was server side, because the assumption was that user won't click back button and go to page they were just on :allears:

(and it wasn't anything with resubmitting the form, just... interesting design choices)

canis minor fucked around with this message at 17:53 on Jul 2, 2019

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Jaded Burnout posted:

Working on a new client's project. Their current coder feels that automated tests are a waste of time. "I'm the only one working on the app so I'll know what might break when making a change". I immediately found a bug that allowed non-admins to see any admin-only page just by going to the path. There were no tests making sure it worked.
Did current coder change their tune? Maybe you can give them a book on testing that might help them see the light? Something like Growing Object Oriented Software, Guided by Tests.

Jaded Burnout
Jul 10, 2004


taqueso posted:

Did current coder change their tune? Maybe you can give them a book on testing that might help them see the light? Something like Growing Object Oriented Software, Guided by Tests.

You mean the co-director of the company? No he's neither leaving nor changing anything, and I'm only doing this for a few weeks. He can keep his lovely attitude.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

Xarn posted:

Yeah, no matter what you think of Eich (garbage), the fact that Brave replaces ads with their own under the guise of "giving money to the content creators" (that we have not talked with about anything and they should be glad we even show their content) should be enough to avoid using it.

Does it do this by default on the desktop or something? I've been using it on my phone because it's the only decent way to block ads on your phone that I've found so far (has the mobile version of Firefox improved lately?), and it definitely isn't inserting ads. I think you have to actively turn that "feature" on.

On the desktop I use a normal browser.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

OddObserver posted:

Back buttons pretty much are a coding horror of their own on the browser end, too, since the full back button experience involves basically saving the entire world (which is kinda.. memory hogging) or you can emulate and save some form state and stuff which is liable to confuse JS.

See e.g. Chrome design doc on switching to option A from option B:
https://docs.google.com/document/d/1YrBKX_eFMA9KoYof-eVThT35jcTqWcH_rRxYbR5RapU/mobilebasic#heading=h.u0zgxzla5xbx

As terrible as it is, the back button is an incredibly powerful metaphor that users have internalized too. But all these new fangled stateless ever-scrolling pages often break it entirely. I stopped using Yahoo News because the broke the back button.

xtal
Jan 9, 2011

by Fluffdaddy

HappyHippo posted:

Does it do this by default on the desktop or something? I've been using it on my phone because it's the only decent way to block ads on your phone that I've found so far (has the mobile version of Firefox improved lately?), and it definitely isn't inserting ads. I think you have to actively turn that "feature" on.

On the desktop I use a normal browser.

It doesn't do that right now because they're focusing on growth. But it is their business model, and they have VCs to pay back. Right now they're kind of like Uber where they're subsidizing everything and not making any money.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

xtal posted:

It doesn't do that right now because they're focusing on growth. But it is their business model, and they have VCs to pay back. Right now they're kind of like Uber where they're subsidizing everything and not making any money.

That's what I figured. If they ever turn that on I'm going to uninstall, hopefully Firefox had caught up by then.

Athas
Aug 6, 2007

fuck that joker

Scaramouche posted:

As terrible as it is, the back button is an incredibly powerful metaphor that users have internalized too. But all these new fangled stateless ever-scrolling pages often break it entirely. I stopped using Yahoo News because the broke the back button.

When you think about it, the old-school web of documents connected by hyperlinks, and processed by a browser with tabs, bookmarks, and a back button, is actually a remarkably pleasant experience. It's sad how we can take something that fundamentally works very well and then easily gently caress it up.

I mean, just consider how well these dead gay comedy forums work (when not on mobile), and they're built on the latest and greatest technology of the futuristic year 2000.

Carbon dioxide
Oct 9, 2012

Athas posted:

When you think about it, the old-school web of documents connected by hyperlinks, and processed by a browser with tabs, bookmarks, and a back button, is actually a remarkably pleasant experience. It's sad how we can take something that fundamentally works very well and then easily gently caress it up.

I mean, just consider how well these dead gay comedy forums work (when not on mobile), and they're built on the latest and greatest technology of the futuristic year 2000.

The Awful App is a very decent experience too, tbh.

xtal
Jan 9, 2011

by Fluffdaddy
I don't think that's a good example since the Awful app only exists because this website is so, well, awful. There was a lot of good in the Web, in that period between XHTML and Gmail. It's basically been garbage ever since.

xtal
Jan 9, 2011

by Fluffdaddy
My preferred analogy for this is that JavaScript is like an artist saying "I can't express myself with this medium! I better bolt a bunch of poo poo on top and misappropriate it instead of using the one designed exactly for my purposes." Now the Web is like the Mona Lisa covered in spray paint and newspaper.

I don't even feel bad about saying that front end developers are morons at this point. It's one thing to be a moron, it's another thing when your stupidity ruins things for everyone else.

xtal fucked around with this message at 23:40 on Jul 2, 2019

Dirt Road Junglist
Oct 8, 2010

We will be cruel
And through our cruelty
They will know who we are
Yeah, front end dev never settled on any strong standards, so you'd have any old fuckwits building poo poo like Flash and Javascript. It's a horribly broken system.

Remember Cold Fusion? DHTML? When HTML kiddies like me in 1998 figured out how to make scroll bars different colors? God, what a fuckshow.

necrotic
Aug 2, 2005
I owe my brother big time for this!
I still dream about chromeless IE websites. The pinnacle of web development.

beuges
Jul 4, 2005
fluffy bunny butterfly broomstick
Going back to the nodejs talk from a few pages back, I've started maintaining a codebase for a client, and one of the things I've started doing is cleaning up the repo.

The original repo is an SVN one, and I've found a .git folder stored in the SVN repo. Also a number of bin, obj, dist and node_modules folders all checked in. Not even necessarily horror-worthy.

But what I thought relevant to the js talk is that, in my quest to clean these things up, I've come across the following folder:

C:\Projects\<repo>\<ionicapp>\node_modules\cordova\node_modules\cordova-lib\node_modules\cordova-js\node_modules\browserify\node_modules\module-deps\node_modules\detective\node_modules\escodegen\node_modules\optionator\node_modules\type-check

Is this normal?

canis minor
May 4, 2011

I'd think Cordova, even when used by Ionic, should contain all of its dependencies on one level; on the other hand, browserify, module-deps, detective do keep their own node_modules

It definitely looks :magical:

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



xtal posted:

I don't think that's a good example since the Awful app only exists because this website is so, well, awful. There was a lot of good in the Web, in that period between XHTML and Gmail. It's basically been garbage ever since.

XHTML was never usable because browser vendors couldn't agree on what a valid document looked like.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

xtal posted:

I don't think that's a good example since the Awful app only exists because this website is so, well, awful. There was a lot of good in the Web, in that period between XHTML and Gmail. It's basically been garbage ever since.
By mobile standards this website is an absolute godsend. It's not responsive but it's also not intentionally degraded, full of ads and popups, or forcing me into the app version at every touch. All that stuff can happen on desktop as well but it's much harder to get away from, specially when they break the navigation.

Ruggan
Feb 20, 2007
WHAT THAT SMELL LIKE?!


SupSuper posted:

By mobile standards this website is an absolute godsend. It's not responsive but it's also not intentionally degraded, full of ads and popups, or forcing me into the app version at every touch. All that stuff can happen on desktop as well but it's much harder to get away from, specially when they break the navigation.

Yeah. I use Awful App but I’m also a heavy user so it makes sense for me. For websites where I am only an occasional user, I find it extremely frustrating to be constantly pushed towards downloading their lovely app.

Mooey Cow
Jan 27, 2018

by Jeffrey of YOSPOS
Pillbug
I really like Microchip's C compiler. Let's say you want to toggle latch B7 (who doesn't?).

Maybe we'll try something like
code:
LATBbits.LATB7 ^= 1;
Let's see what that produces.
code:
MOV LATB, W1
LSR W1, #7, W1
COM W1, W1
AND W1, #0x1, W1
SL W1, #7, W1
MOV LATB, W2
BCLR W2, #7
IOR W1, W2, W2
MOV W2, LATB
Oh god oh geez oh no what's happening :gonk:

Let's try something else.
code:
if (LATBbits.LATB7)
    LATBbits.LATB7 = 0;
else
    LATBbits.LATB7 = 1;
That makes
code:
BTST LATB, #7
BRA Z, 0x3FE
BCLR LATB, #7
BRA 0x400
BSET LATB, #7
That's a lot less (even though BRA is potentially a 2-cycle instruction). Because there are instructions to test, set and clear specific bits, and the compiler knows about them because it's very smart (but not too smart).

But there is also a bit toggle instruction (BTG) on this processor. Let's find it.
code:
uint16_t w = LATB;
w ^= (1 << 7);
LATB = w;
code:
BTG LATB, #7
Ah, there she is! Beautiful. It also optimized away the potential read-write vulnerability of using a temp variable, for some reason. It's what my heart wanted but not what my hands wrote.

There's also a __builtin_btg(). If you use it you get
code:
MOV #0x2CC, W1
BTG [W1], #7
It stores the address in a register and then uses that instead. That's... better? :thunk:
At least it reuses the register if you toggle multiple bits.



Note: Your results may vary if you're a rich bastard that pays for higher optimization levels.

redleader
Aug 18, 2005

Engage according to operational parameters

beuges posted:

Going back to the nodejs talk from a few pages back, I've started maintaining a codebase for a client, and one of the things I've started doing is cleaning up the repo.

The original repo is an SVN one, and I've found a .git folder stored in the SVN repo. Also a number of bin, obj, dist and node_modules folders all checked in. Not even necessarily horror-worthy.

But what I thought relevant to the js talk is that, in my quest to clean these things up, I've come across the following folder:

C:\Projects\<repo>\<ionicapp>\node_modules\cordova\node_modules\cordova-lib\node_modules\cordova-js\node_modules\browserify\node_modules\module-deps\node_modules\detective\node_modules\escodegen\node_modules\optionator\node_modules\type-check

Is this normal?

This was, in fact, normal for older versions of node. At some point they realised how stupid this was and went to a flat folder for dependencies, likely encouraged by the fact that you could run into all sorts of fun errors on Windows because some node packages had paths in their node_modules which exceeded the Windows path length.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Don't bit fields have weird requirements that mean that the bit toggle code gen output wouldn't be valid?

Absurd Alhazred
Mar 27, 2010

by Athanatos
I'm probably the coding horror, but I've started playing around with intrinsics to optimize hot loops in our code, it's not all that bad once you get into it. Funny to see which operations the compiler figures out to use xmm registers which and which it doesn't, though.

Godbolt is a godsend, by the way; it won't tell you anything about cache misses or other issues, but it'll at least tell you if you're reducing instruction count and function calls.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Does it tell you if you're replacing a fast sequence of instructions with a single instruction that happens to be slower?

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

Jabor posted:

Does it tell you if you're replacing a fast sequence of instructions with a single instruction that happens to be slower?

No, it just shows assembler code. The whole site is basically a wrapper for a script like
code:
watch 'cc -S -o - filename | grep -v "all the stupid poo poo nobody wants to see"'
https://www.youtube.com/watch?v=bSkpMdDe4g4
e: relevant part starts 15 minutes in

Zopotantor fucked around with this message at 05:34 on Jul 4, 2019

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
look that one up in your fog & agner's

Adbot
ADBOT LOVES YOU

Absurd Alhazred
Mar 27, 2010

by Athanatos

Jabor posted:

Does it tell you if you're replacing a fast sequence of instructions with a single instruction that happens to be slower?

Nope, although you can always check instruction speed an throughput on Intel's website.

It also doesn't tell you when whatever the OoO engine does in the background is faster than the series of intrinsics you can come up with for doing certain things manually.

I do couple this type of thing with actually running it on semi-real data to see if there's actual improvement.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply