Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

03-23-2017 , 03:10 PM
Awesome! https://www.dailydot.com/layer8/gop-...data/?tw=share

Quote:
Senate Republicans on Thursday voted along party lines to gut the FCC’s broadband privacy regulations. The resolution will now proceed to the House, where it is also expected to pass.

The Federal Communications Commission regulations, which came into effect in October, barred internet service providers from selling their subscribers internet browsing histories—without consent—to third parties, a rule GOP lawmakers have painted as overly restrictive and innovation-stifling.
So what's the solution here - always use a VPN? Or t-0-r or something? Ideally something that blocks my ISP from seeing my browsing history, but isn't a favorite tool of hackers or pedophiles.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2017 , 04:24 PM
Wow lol and I thought the UK snoopers charter was bad!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2017 , 07:52 PM
Quote:
Originally Posted by suzzer99
Awesome! https://www.dailydot.com/layer8/gop-...data/?tw=share



So what's the solution here - always use a VPN? Or t-0-r or something? Ideally something that blocks my ISP from seeing my browsing history, but isn't a favorite tool of hackers or pedophiles.
It'll be the new norm
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2017 , 08:49 PM
So should an aspiring developer/programmer learn regex? It seems like it is mandatory for a whole bunch of interview questions but looking at that stuff fills me with depression and misery.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2017 , 08:58 PM
What kind? (of programmer)

Front end you won't need it until "late". At least learn what ^ and $ does thats probably fine. I still google most of my regex things that aren't super trivial.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2017 , 09:05 PM
Quote:
Originally Posted by OmgGlutten!
So should an aspiring developer/programmer learn regex? It seems like it is mandatory for a whole bunch of interview questions but looking at that stuff fills me with depression and misery.
learn the bare bones and about matching groups, it'll only take an afternoon and some practice

Don't bother with lookaheads and stuff like that imo. When I was first starting I went deep on regex and never used anything but the bare fundamentals.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2017 , 10:16 PM
Regex's are used in interview questions??? That's crazy-town. I guess its useful to understand the basics, but I generally have to re-learn anything non-trivial the 1-2 times a year I use them.

https://blog.codinghorror.com/regula...-two-problems/
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2017 , 10:25 PM
Im at a job that heavily uses regex and there was nothing related to regex in the interviews. Never had a regex q of any kind in any interview process in fact
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2017 , 10:30 PM
Never seen regex in a technical interview either. It's neither hard, nor fundamental enough to make sense in a technical interview - you can learn it in an hour even if you've never seen it before. And lots of good programmers will be rusty at best, especially with the syntax, not to mention that the syntax varies from one environment to another.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2017 , 10:46 PM
lol at any company that puts anything beyond basic regex in an interview question, aint nobody got brain space to remember the more complicated syntax
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2017 , 11:33 PM
Maybe regex is the wrong term. I was talking about the types of questions you see on exercism.io where you have to manipulate a string but first have to remove all non a-z characters except you have to leave ' in can't while taking out the single quotes around other words, etc and end up with code like this:

words = phrase.downcase.gsub(/[^A-Za-z0-9,'\s]/,"").gsub(/,/, " ").split(/'*\s+'*/)

is this stuff less tedious than it looks?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2017 , 11:50 PM
that looks straightforward to me.

what about it fills you with misery? does it look hard? or impractical? because it's not either.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-23-2017 , 11:54 PM
Quote:
Originally Posted by ChrisV
lol at any company that puts anything beyond basic regex in an interview question, aint nobody got brain space to remember the more complicated syntax
i wouldn't find it too odd. if you weren't allowed to google or were whiteboarding and got dinged for not remembering the look ahead syntax or forgetting an escape backslash, that would be silly. but regexes are basic, useful tools that are often the best answer if you're doing string manipulation.

plus if you don't use them it means you're using a text editor which isn't vim so you should be auto-disqualified :P
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2017 , 12:12 AM
Quote:
Originally Posted by gaming_mouse
i wouldn't find it too odd. if you weren't allowed to google or were whiteboarding and got dinged for not remembering the look ahead syntax or forgetting an escape backslash, that would be silly. but regexes are basic, useful tools that are often the best answer if you're doing string manipulation.

plus if you don't use them it means you're using a text editor which isn't vim so you should be auto-disqualified :P
I mean everything in the line OmgGlutten pasted is fine, like [].*?\s\d^$ and so forth, but for grouping and more complicated stuff like that, syntax differs between implementations and it takes 2 mins to look it up when needed.

Spoiler:
Although OmgGlutten loses points for the A-Z after a downcase
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2017 , 12:13 AM
Quote:
Originally Posted by gaming_mouse
that looks straightforward to me.

what about it fills you with misery? does it look hard? or impractical? because it's not either.
I guess I just need to learn it then.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2017 , 12:19 AM
I'm surprised you guys think that would be ok as an interview question. I just don't really see what you learn asking it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2017 , 12:47 AM
Quote:
Originally Posted by jjshabado
I'm surprised you guys think that would be ok as an interview question. I just don't really see what you learn asking it.
i doubt i'd ever ask one, but it seems like fair game to me.

writing regexes has the problems chris mentioned, but if you can't read a basic regex, say, i think that reliably marks you as either not very experienced or experienced in a narrow realm. it's a filter question, like fizzbuzz.

EDIT: i should add that if i got one, it would probably make me think the company or at least interviewer had a perspective that missed the forest for the trees, but it would depend on how it was presented.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2017 , 01:57 AM
Quote:
Originally Posted by gaming_mouse
i think that reliably marks you as either not very experienced or experienced in a narrow realm. it's a filter question, like fizzbuzz.
I think thats a bit of a leap to compare
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2017 , 06:11 AM
Don't know about anyone else, but every time I need to do some Regex I have to open a cheat sheet. Can only remember the basics. Interview questions of this type imo are memory questions.

Quote:
I was talking about the types of questions you see on exercism.io where you have to manipulate a string but first have to remove all non a-z characters
Loop each char and build a new string ignoring a-z's. Much easier for someone else to understand, much easier to modify and maintain and I'm sure will be more performant as well.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2017 , 07:36 AM
Quote:
Originally Posted by gaming_mouse
i doubt i'd ever ask one, but it seems like fair game to me.

writing regexes has the problems chris mentioned, but if you can't read a basic regex, say, i think that reliably marks you as either not very experienced or experienced in a narrow realm. it's a filter question, like fizzbuzz.

EDIT: i should add that if i got one, it would probably make me think the company or at least interviewer had a perspective that missed the forest for the trees, but it would depend on how it was presented.
FWIW, I would need to think relatively hard to actually figure out what OmgGlutten's regex does and I probably wouldn't get it right the first time.

I rarely come across non-trivial regexes in the wild and when I need it I usually just build it incrementally with testing or with an online regex editor then promptly forget everything I just learned.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2017 , 07:37 AM
Quote:
Originally Posted by Gullanian
Loop each char and build a new string ignoring a-z's. Much easier for someone else to understand, much easier to modify and maintain and I'm sure will be more performant as well.
I generally agree with this spirit - but I'm skeptical it would actually be more performant. I thought most languages had pretty optimized regex support.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2017 , 08:06 AM
I'd be super surprised if Regex would beat that sort of algorithm. Regex support may be optimised but it's still got to check every character in the string at some point, except in a more convoluted way.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2017 , 08:38 AM
Quote:
Originally Posted by Gullanian
Don't know about anyone else, but every time I need to do some Regex I have to open a cheat sheet. Can only remember the basics. Interview questions of this type imo are memory questions.

Loop each char and build a new string ignoring a-z's. Much easier for someone else to understand, much easier to modify and maintain and I'm sure will be more performant as well.
I don't remember predefined character classes well, but you really don't need to and expecting anyone to remember these in detail would be pretty ridiculous in a general interview. Just literally replace any character other than a-z. A simple yourstring.replaceAll("[^a-z]","") is going to be much easier to read and maintain than anything that loops over characters, imo.

Performance is a complete non-issue in like 99.99% of use cases and imo it would be a red flag re: premature optimization if a candidate brings it up in this context (unless asked about it obviously).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2017 , 09:05 AM
I've used regexes in Google analytics a decent amount to isolate specific query strings and such. Even if i had been doing it regularly, I still always used an online tool to check to make sure I did it correctly and knowing it beforehand really didn't save any time.

Unless there is a specific reason you are going to be doing tons of it, committing it to memory seems like a waste of precious brain space.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-24-2017 , 10:26 AM
Quote:
Originally Posted by plexiq
Performance is a complete non-issue in like 99.99% of use cases and imo it would be a red flag re: premature optimization if a candidate brings it up in this context (unless asked about it obviously).
Agree with this for most stuff, but even simple looking regex's can have n squared performance.

Jeff Atwood did a post on it:
https://blog.codinghorror.com/regex-performance/

Small strings, small patterns sometimes = big meaningful time sinks. I always avoid using Regex if I can. Could call it premature optimisation but it's safer long term as well if someone else comes along who doesn't know what they are doing and modifies the expression horribly which is not unusual!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m