Software Development and Programming Careers (Official Discussion Thread)

null

...
Joined
Nov 12, 2014
Messages
29,435
Reputation
4,949
Daps
46,610
Reppin
UK, DE, GY, DMV
Alright, breh, I got it.

This is my JavaScript solution.

Code:
function matchInput (a) {
  let b;
  let c;
  a.toString('');
  if (a.includes('(') && a.includes('[') && a.includes('{') )  {
    if (a.includes(')') && a.includes(']') && a.includes('}')) {
      b = true;
      c = true;
    } else {
      b = false;
      c = false;
    }
  } else if (a.includes('(') && a.includes('[')) {
    if (a.includes(')') && a.includes(']')) {
      b = true;
      c = true;
    } else {
      b = false;
      c = false;
    }
  } else if (a.includes('(') && a.includes('{')) {
    if (a.includes(')') && a.includes('}')) {
      b = true;
      c = true;
    } else {
      b = false;
      c = false;
    }
  } else if (a.includes('{') && a.includes('[')) {
    if (a.includes('}') && a.includes(']')) {
      b = true;
      c = true;
    } else {
      b = false;
      c = false;
    }
  } else if (a.includes(')') && a.includes(']') && a.includes('}') )  {
    if (a.includes('(') && a.includes('[') && a.includes('{')) {
      c = true;
      b = true;
    } else {
      c = false;
      b = false;
    }
  } else if (a.includes(')') && a.includes(']')) {
    if (a.includes('(') && a.includes('[')) {
      c = true;
      b = true;
    } else {
      c = false;
      b = false;
    }
  } else if (a.includes(')') && a.includes('}')) {
    if (a.includes('(') && a.includes('{')) {
      c = true;
      b = true;
    } else {
      c = false;
      b = false;
    }
  } else if (a.includes('}') && a.includes(']')) {
    if (a.includes('{') && a.includes('[')) {
      c = true;
      b = true;
    } else {
      c = false;
      b = false;
    }
  } else if (a.includes(')')) {
    if (a.includes('(')) {
      c = true;
      b = true;
    } else {
      c = false;
      b = false;
    }
  } else if(a.includes('}')) {
    if (a.includes('{')) {
      c = true;
      b = true;
    } else {
      c = false;
      b = false;
    }
  } else if(a.includes(']')) {
    if(a.includes('[')) {
      c = true;
      b = true;
    } else {
      c = false;
      b = false;
    }
  } else if (a.includes('(')) {
    if (a.includes(')')) {
      b = true;
      c = true;
    } else {
      b = false;
      c = false;
    }
  } else if(a.includes('{')) {
    if (a.includes('}')) {
      b = true;
      c = true;
    } else {
      b = false;
      c = false;
    }
  } else if(a.includes('[')) {
    if(a.includes(']')) {
      b = true;
      c = true;
    } else {
      b = false;
      c = false;
    }
  } else {
    return false;
  }
  if(b && c ) {
  return true;
  } else {
    return false;
 }
}
:picard::huhldup:

because the input string can be "long" ... (in general) as others pointed out you are best served by a data structure.

if you know that the string will be "short" you could look at using something faster like a plain non-stl array.

compilers use stacks (well some used to) e.g. recusrive descent compilers so as that problem can be considered a simple langauage (with simple rules) a stack will work.

in c++ something like this:

Code:
bool isValid(string s) {
    if (s.length() < 2)
      return false;
 
    std::stack<char> stack;

    for (auto c : s) {
 
      if (c == '{' ||
          c == '[' ||
          c == '(') {
        stack.push(c);
      } else {

        if ((c =
             (c == '}' ? '{' :
              (c == ']' ? '[' :
               (c == ')' ? '(' : ' ')))) != ' ') {
     
          if (stack.empty() ||
              stack.top() != c) {
            return false;
          }
     
          stack.pop();
        }
      }
    }
 
    return stack.empty();
}

I've decided to work through a couple of leet problems each day.

I did a quick search on here and found your post.

^ solution will skip over other characters.

to error on then

!= ' ' becomes == ' ') return false;
 
Last edited:

Rev Leon Lonnie Love

damned mine eyes, DAMNED mine eyes!!
Joined
Nov 11, 2017
Messages
22,308
Reputation
5,749
Daps
90,210
Good for her and a lot of those millenial in those series. And I'm not mad at her having her :mjpls:.

I've always been turned off by the prospect of working at big tech/FAANG. Not sure why
Im not gonna front, im gunning for Google (within 3 years from now at the latest). No brag but I think i got the chops and experience to get into one of their teams :yeshrug:. Its really all about the money and the doors the FAANG names open for you after you're starting to be :flabbynsick:. Basically you can use that name on your resume to a cushy executive role where you barely do anything except feast on investors' money :ohlawd:.
 

Regular Developer

Supporter
Joined
Jun 2, 2012
Messages
8,417
Reputation
1,959
Daps
23,622
Reppin
NJ
Im not gonna front, im gunning for Google (within 3 years from now at the latest). No brag but I think i got the chops and experience to get into one of their teams :yeshrug:. Its really all about the money and the doors the FAANG names open for you after you're starting to be :flabbynsick:. Basically you can use that name on your resume to a cushy executive role where you barely do anything except feast on investors' money :ohlawd:.
Makes sense. I think some of the black ppl that came out talking about their experience might have contributed, but I do hope you get in and get that resume upgrade package, lol.
 

IIVI

Superstar
Joined
Mar 11, 2022
Messages
11,720
Reputation
2,791
Daps
40,404
Reppin
Los Angeles
This. The truth of the matter is that the jobs that are niche and require heavy knowledge of math and programming are not as common as tech jobs that require just IT certs to attain. Those jobs that require heavy programming knowledge are usually dominated by STEM graduates and those who went to do some research based grad program in the sciences. The number of people who are in tech having those specialized jobs are likely to be the minority so threads like this won't do numbers like that.








I vouch for this Adbul Bari breh. He really is one of the best out there and the view count tells it all :wow:
Appreciate breh. I definitely heard of that guy, but never checked out his videos.

I also ran into mycodeschool as well who was recommended:
 

Cloud

Pro
Joined
May 7, 2018
Messages
189
Reputation
30
Daps
717
Reppin
\
I know I'm not the most active coli member, but I wanted to share to the brehs on here who might be losing motivation.

I am a recent CS grad from a not too impressive school in Texas. I was definitely not the brightest student - probably average to below average. Barely would pass my CS classes, would use Quizlet when I can, the whole nine yards. Terrible student. My friends in the field would encourage me to join hackathons or do projects ,but I kind of shrugged it off. I wasn't confident at all in my coding ability. In my final exam at an Algorithms course, I turned in my exam and the professor looked it over on the spot, pointed at an easy question I fukked up on, and told me to go fix my answer.

I was lucky enough to land an internship my senior year and working around the friendly cacs encouraged me to study a bit. I told myself when I finish classes (I graduate in the summer) that I was going to put my head down and study. I chose a language (Java) and began studying data structures. Videos just like the one posted above from mycodeschool is what taught me more or less. I planned on doing this until the end of the year before applying, but I got hit up by a recruiter on LinkedIn, went through the interview, and passed it easily.

I got offered a job offering a little over $100,000 TC. :blessed:Y'all stay motivated stay blessed. It's money out here, keep working hard.
 

IIVI

Superstar
Joined
Mar 11, 2022
Messages
11,720
Reputation
2,791
Daps
40,404
Reppin
Los Angeles
Real good discussion:


Whole interview was great and I loved some of the bits and productivity/coding tips he had. Ever since I started using debuggers my productivity and how quick I understand what the code is doing really leveled up exponentially vs console logging everything. I've had and am still having a pain setting up the debugger in my IDE for the project at my company because it's too intricate smh.

I also completely agree about the over-abstraction. Keep it simple.

Kind of a crazy question to ask, but what ya'll think is the next wave? Right now everything is web/A.I. and Javascript (basically anything with a web browser or an interface to the web is using Javascript). I'm trying to imagine what the next meta/interface is going to be (probably a trillion dollar question tbh).
 
Last edited:

null

...
Joined
Nov 12, 2014
Messages
29,435
Reputation
4,949
Daps
46,610
Reppin
UK, DE, GY, DMV

Regular Developer

Supporter
Joined
Jun 2, 2012
Messages
8,417
Reputation
1,959
Daps
23,622
Reppin
NJ
I don't think the "best programming language" discussion will ever die. As many times as a new language has came out to replace ______, nothing's ever really gone away. Ill watch the video later, but I'm sure they're talking about pros and cons of languages, but I'd be surprised if they come up with a "best".
 

Rev Leon Lonnie Love

damned mine eyes, DAMNED mine eyes!!
Joined
Nov 11, 2017
Messages
22,308
Reputation
5,749
Daps
90,210
Real good discussion:


Whole interview was great and I loved some of the bits and productivity/coding tips he had. Ever since I started using debuggers my productivity and how quick I understand what the code is doing really leveled up exponentially vs console logging everything. I've had and am still having a pain setting up the debugger in my IDE for the project at my company because it's too intricate smh.

I also completely agree about the over-abstraction. Keep it simple.

Kind of a crazy question to ask, but what ya'll think is the next wave? Right now everything is web/A.I. and Javascript (basically anything with a web browser or an interface to the web is using Javascript). I'm trying to imagine what the next meta/interface is going to be (probably a trillion dollar question tbh).

This grifter ain't getting no clicks from me :scust:
 
Top