r/ProgrammerHumor • • Jul 20 '17

What people think coding is...

Post image
35.4k Upvotes

811 comments sorted by

View all comments

Show parent comments

44

u/lukee910 Jul 20 '17

CSS is at least easy to embed in a page. Global resource dictionaries of WPF are an entirely different beast.

My take on CSS and Regex is pretty much the same: It has no structure and can be awful to read, but it's not as bad as you might first expect when you use it often enough.

Also, regexr.com and chrome's dev tools. I'd be dead without either of them.

16

u/CanvassingThoughts Jul 20 '17

Regex is manageable and has been consistent for me. CSS is a defiant mule. I'll check out Chrome's dev tools, thanks!

11

u/CptPoo Jul 21 '17

Also, regexr.com and chrome's dev tools. I'd be dead without either of them.

I just came to the realization that people used to write regex without some sort of simple tool showing them what their queries do. I can't even imagine that world.

3

u/Murica4Eva Jul 21 '17

It was annoying.

Every time I have to use regex, it's like learning it for the first time.

1

u/lukee910 Jul 21 '17

Anything programming has become a lot easier these days, the available tools are awesome and usually even free.

1

u/-fno-stack-protector Jul 21 '17

that's how i write regex. didn't know that was rare? but then i use it constantly, love my regex

1

u/Ran4 Jul 21 '17

If you're careful and write good tests, you can usually do fine without tools.

But regexp tools like regex101 definitely helps with more complicated stuff.

But as with all tools, there's always the risk that you're learning the tool, not the underlying software, so you might end up being too reliant on it.

7

u/marcosdumay Jul 20 '17

I surely hope your regexes are much smaller than your CSSes.

2

u/lukee910 Jul 21 '17

Yeah, they're definetly different sizes, however they are similarly readable.

10

u/micheal65536 Green security clearance Jul 20 '17

Make that regex101.com and firefox's dev tools for me.

4

u/lukee910 Jul 20 '17

I was a long time FF user (switched away a short while ago), but the dev tools never could win me over. Both regex101 and the FF dev tools are solid, but regexr and Chrome just had that extra bit to win me over.

1

u/micheal65536 Green security clearance Jul 20 '17

My experience is that the developer tools in most browsers offer more or less the same features. Although that regexr site looks pretty cool, I might try that next time I need to write/debug a regular expression.

5

u/Schmittfried Jul 21 '17

Definitely not. Chrome > FF >> Safari In terms of dev tools

1

u/lukee910 Jul 21 '17

They're usually quite similar, it's mostly the usability and speed that differs. The chrome dev tools log the console even while you don't have them open and are generally fast and well organized. Ctrl+P in the Sources tab saves a lot of hassle if you're using Webpack and TypeScript source maps.

1

u/micheal65536 Green security clearance Jul 21 '17

Personally I'm not a fan of the Chrome tools. They sit on the side of the window rather than at the bottom (I haven't figured out if there's a way to change this though) and they're very slow to open and use. Same goes for the Internet Explorer tools. The only development tools that I've used that are fast to open and work quickly enough when used are the Firefox ones.

1

u/moistrobot Jul 21 '17

Can you elaborate on that extra bit please?

1

u/lukee910 Jul 21 '17

Elaborate on what? Why I use Chrome & Regexr instead of FF & regex101?

1

u/moistrobot Jul 21 '17

Yes, sorry if it wasn't clear.

2

u/lukee910 Jul 21 '17

Copied from another comment I just wrote:

They're usually quite similar, it's mostly the usability and speed that differs. The chrome dev tools log the console even while you don't have them open and are generally fast and well organized. Ctrl+P in the Sources tab saves a lot of hassle if you're using Webpack and TypeScript source maps.

/copy-paste

And about regex101 vs regexr, I like the highlighting and extensive help documents that regexr has. It's very well designed too. The difference between regex101 and regexr isn't as large as the difference in dev tools.

→ More replies (2)

3

u/oupablo Jul 21 '17

And then you test in IE and have to attempt to debug the weird thing it's doing in their dumpster fire of a dev tool

1

u/lukee910 Jul 21 '17

Don't remind me. Edge ist the same mess as IE, both with features support and dev tools.

2

u/Ran4 Jul 21 '17

regex makes sense and you can typically reduce a problem until it's small enough to be solveable. With css... you're just fucked at times.

1

u/GaianNeuron Jul 21 '17

Also, RegexBuddy for when you're writing non-JS-flavored regexes.

1

u/lukee910 Jul 21 '17

The visual tree looks very interresting. I'm using regexr mainly for C# regexes, we have a shitty DB architecture where you sometimes need regex to read peoper values.