IT/Software career thread: Invert binary trees for dollars.

ShakyJake

<Donor>
7,641
19,281
Maybe they're really efficient.

This feels like the wrong usage for a regex. Why not strip [0] and [-1] and then split on comma?
Because I need it to match specifically to that pattern. There is other CSV text in the string that I need it to NOT match against when not wrapped in parens.
 

Deathwing

<Bronze Donator>
16,424
7,435
Because I need it to match specifically to that pattern. There is other CSV text in the string that I need it to NOT match against when not wrapped in parens.
I'm not good enough at regex for this, sorry. My inclination would be to regex between first open and close parentheses and then split the result on comma. That might be more expensive than a repeated capture group, which I think is what you want.

EDIT: thought on your problem a bit more.

You're saying there could be "(73245q0987q03498trq09ew8r)" that you'd want to ignore and "(132352345029q348029384,bob)" that you'd want because it contains that comma?
 
Last edited:

ShakyJake

<Donor>
7,641
19,281
I'm not good enough at regex for this, sorry. My inclination would be to regex between first open and close parentheses and then split the result on comma. That might be more expensive than a repeated capture group, which I think is what you want.

EDIT: thought on your problem a bit more.

You're saying there could be "(73245q0987q03498trq09ew8r)" that you'd want to ignore and "(132352345029q348029384,bob)" that you'd want because it contains that comma?
There's a possibility of two types of inputs:

A,B,C,D,E,F

and

(A,B,128)

Basically I needed a regex that would match line 1 but not line 2 and vice versa.

But, it's fine, I got everything working. Basically used a regex that matches the parens string, then just manually remove the parens and split off the ','.
 
  • 1Like
Reactions: 1 user

Deathwing

<Bronze Donator>
16,424
7,435
There's a possibility of two types of inputs:

A,B,C,D,E,F

and

(A,B,128)

Basically I needed a regex that would match line 1 but not line 2 and vice versa.

But, it's fine, I got everything working. Basically used a regex that matches the parens string, then just manually remove the parens and split off the ','.
So, what I suggested ;)

I would be curious if one regex would work and if it would even be the ideal solution from a performance standpoint. I was surprised to learn that Python, for example, doesn't support repeated capture group natively.
 

wilkxus

<Bronze Donator>
518
210
Products & Services Listing
3rd Gen Forward-Looking Infrared
...<snip>
Zumwalt-Class Destroyer
Nice, cool as fuck list.

Beats snot out of most of the boring ass shit I did for 90% of all my years in banking finance gaming and other IT industry software put together. Gotta be honest, even though I disliked govt bureaucracy the most, it was all right, and I never worked in defense (and anything really cool). The for profit industry was often much much worse in terms of efficiency (especially banking and finance, where what lurked beneath surface was VERY illegal, outright thievery as opposed to *just* inefficiency that I found in govt), it was just better and craftily hidden. Every job comes with some baggage, and lots of various positive and negative trade-offs anywhere you go.

And remember if it wasnt for govt defense R&D(which some of you appear to be crapping on, even though youre in IT *boggle* ) you would not have ANY IT or silicon valley whatsoever. None, zero, zip. Govt thinks and plans long term where private for profit...... doesnt. It just gets to profit from hard work and decades long investments of govt funded R&D, pretending to innovate on the back of a fckton of govt funded research. Thats the way the system is designed and it works well, best in world by FAR. And you often need a TON of R&D long term success-failure cycles before someone else can finally come along and know how to commercialize it properly.
 

Noodleface

A Mod Real Quick
37,961
14,508
How many are dead weight? Im not sure. The only truly dead weight I've worked with have been repositioned to support roles rather than engineering. Like the new hot chick we got, everyone said she was awful and she's now an admin type person.

If anything, people like that are in the worst position. After a few years no other company will touch her. Everything I do feels meaningful at least. I wish I was working more on tactical code but it is what it is. I will say this, at least at this job I can see my stuff working and out in the field. At emc we just wrote code on boxes and they went out and that was it.

My current job I actually really like outside the scrum shit. They had me as "50%" of a head for like 6 months projected but after 2 months I'm 100% and the top dude on the team (lot of Junior engineers)

Today I came in at 7 and left at 6 (OT), most people came in at 830 and left at 4-430 and we work 9 hour days....
 
Last edited:

TJT

Mr. Poopybutthole
<Gold Donor>
41,007
102,965
Alright Regex experts, I need a pattern to match this...

(R,C,126)

I need the pattern match on the parenthesis BUT exclude them in the result, as well as then match a comma-separated list of values excluding the commas. So, using an iterator, the output would be:

R
C
126

This is for C++, if that makes any difference. Javascript has some limitations with its regex expressions which isn't implacable here.

I am dogshit at C++, but if you can use something similar like replace() in javascript. This will indeed strip all that shit out.

[^a-zA-Z0-9 ] and return R C 126 to you if you replace with " ". Then do some string mutation to format it how you like.
 

Deathwing

<Bronze Donator>
16,424
7,435
Yeah, what is super simple in Javascript, Java, or C# is ugly and a pain in the ass in C++. I'll be glad when I'm done with this course. I absolutely cannot stand working with this language.
Sounds like you're already done. The purpose of teaching C++ is to make you hate it and appreciate other languages.
 
  • 2Worf
  • 1Solidarity
Reactions: 2 users

Deathwing

<Bronze Donator>
16,424
7,435
I think it was Linus Torvalds that said C++ gives you just enough rope to hang yourself with. I have no problems with C, the language is good at what it's intended(low level and performance). C++, in attempts to stay modern, has grafted on lots of ugly constructs, keywords, and symbols. Recent standards have done a decent job of patching things up, but you're still left with some rather ugly history. Especially when you consider how reliant C++ is on third party libraries. You may use standard C++17, but your dependencies might not.
 
  • 1Like
Reactions: 1 user

Ao-

¯\_(ツ)_/¯
<WoW Guild Officer>
7,879
507
so all you nerds that do development type work... how do you make sure your code is secure?
 

Noodleface

A Mod Real Quick
37,961
14,508
Coverity for the simple stuff, but we also use Google tests, Jenkins tests and now have manual security checks passed down through the ISSO to have people start looking into common and uncommon attack vectors
 

Deathwing

<Bronze Donator>
16,424
7,435
Oh, you meant bug free? I thought you meant preventing people getting ahold of your source.

Odd that Noodleface Noodleface mentions Coverity, my employer makes a competing product.
 

Ao-

¯\_(ツ)_/¯
<WoW Guild Officer>
7,879
507
yeah I mean more making sure there isn't any sql injection vectors, etc, not keeping source away from people

we use Veracode and so I'm looking at other options.
 

Lendarios

Trump's Staff
<Gold Donor>
19,360
-17,424
You stay away from open source as much as possible
You stay away from being the first to implement a new cool library. You follow best practices. You use microsoft products.

Never be first to implement the latest and greatest.
Let others do that.
 

Loser Araysar

Chief Russia Correspondent / Stock Pals CEO
<Gold Donor>
75,607
150,074
Anyone here doing SalesForce stuff?

My fiance works in production planning for a food manufacturer but I'm trying to get her out of it. The employment opportunities are limited because its a somewhat narrow field and the pay is shit. She started working there as a receptionist a few years ago and worked her way up. She has a Bachelor's in Business Administration from ASU.

I want to try and move her into project management or something more tech-oriented like Salesforce Administration just to expand her employment opportunities geographically wise and also give her work from home capabilities if needed.

I've been hearing that SalesForce admin work is pretty lucrative right now and fairly high in demand. At the same time, barriers to entry are fairly low. A study guide that can be banged out in a couple of weeks easily and then a multiple choice test of 90 questions or so.

Has anyone done it or knows anyone doing it? Any feedback or experiences with it? Good idea? Dumb idea?

thanks bros
 

a_skeleton_03

<Banned>
29,948
29,762
I've been hearing that SalesForce admin work is pretty lucrative right now and fairly high in demand. At the same time, barriers to entry are fairly low. A study guide that can be banged out in a couple of weeks easily and then a multiple choice test of 90 questions or so.
I have a friend that works for them and he says that this is all true based on the support he has to give users. It is also all the rage.