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

TJT

Mr. Poopybutthole
<Gold Donor>
40,938
102,750
Confucious say, "If you have problem and you decide that RegEx is the solution. You now have two problems."
 
  • 3Worf
  • 1Truth!
Reactions: 3 users

TJT

Mr. Poopybutthole
<Gold Donor>
40,938
102,750
It's just a simple GUI address book for now. I thought I had to use regex to solve how to search. Boy was I wrong.

EDIT : Also, what tools are you talking about? About the only tool that I can really find that will be helpful to me, really, is a GUI for youtube-dl.

Should be pretty good for your use case then. I've never ran across your specific one though. Whenever I had data I needed or needed to push I always had the actual DB accessible.
 

Kuro

Naxxramas 1.0 Raider
8,352
21,239
Was introduced to the "Fizzbuzz Problem" by a friend today, who said it's an interview question for coding jobs.

I know basically shit all and was able to do it in 9 lines pretty quickly. I'm pretty sure you can do it in 1 but I don't know enough yet to do so. It concerns me if this is actually a job interview question, unless getting it to 1 line is the point and is significantly more complicated.

I know a couple folks here cautioned against bootcamps, but I ended up signing up for a local one that has a good relationship with the hiring managers in town (Over a 90% hire-rate, going by linked-in). I haven't interviewed for a job in over 6 years, so I figure the job-search help part of the bootcamp will be worthwhile, and the class portion should help me focus a bit more than "grab random Udemy courses," which is what I've been doing so far.
 
Last edited:

ShakyJake

<Donor>
7,627
19,254
Was introduced to the "Fizzbuzz Problem" by a friend today, who said it's an interview question for coding jobs.

I know basically shit all and was able to do it in 9 lines pretty quickly. I'm pretty sure you can do it in 1 but I don't know enough yet to do so. It concerns me if this is actually a job interview question, unless getting it to 1 line is the point and is significantly more complicated.
I should hope the interviewer expects your code to be clear and understandable. Cramming things into 1 line probably won't achieve this.
 

TJT

Mr. Poopybutthole
<Gold Donor>
40,938
102,750
Was introduced to the "Fizzbuzz Problem" by a friend today, who said it's an interview question for coding jobs.

I know basically shit all and was able to do it in 9 lines pretty quickly. I'm pretty sure you can do it in 1 but I don't know enough yet to do so. It concerns me if this is actually a job interview question, unless getting it to 1 line is the point and is significantly more complicated.

I know a couple folks here cautioned against bootcamps, but I ended up signing up for a local one that has a good relationship with the hiring managers in town (Over a 90% hire-rate, going by linked-in). I haven't interviewed for a job in over 6 years, so I figure the job-search help part of the bootcamp will be worthwhile, and the class portion should help me focus a bit more than "grab random Udemy courses," which is what I've been doing so far.

I've got the fizzbuzz question on interviews three times. It was just a segway into the harder questions. Fizzbuzz is like proving you know what code is and looks like. Then you get some more realistic, but still retarded, question.

I work in Austin and companies collaborate to design bootcamps a lot. They also hire from them constantly. But the scope of them is pretty narrow. They are mostly for front end developers. They do make sense. Because a CS grad might be more skilled but a CS grad could have used fuck knows what languages and tools other than C. As so much of a CS education is freeform do whatever the fuck you want.

The intent of bootcamps is to be familiar enough with entry level development to get shit done. It is more about teaching your new hires your exact development pipeline and technology stack. This is good for entry level because if you hire Bootcamp grads they literally don't know anything else as they generally have not had the time to be exposed to more shit. It is very efficient in that way.
 

TJT

Mr. Poopybutthole
<Gold Donor>
40,938
102,750
I should hope the interviewer expects your code to be clear and understandable. Cramming things into 1 line probably won't achieve this.

If you were going for a python developer and made it a one-liner of pythonic trash you'd prob be hired on the spot.
 
  • 1Like
  • 1Worf
Reactions: 1 users

The_Black_Log Foler

Stock Pals Senior Vice President
<Gold Donor>
43,755
40,677
Was introduced to the "Fizzbuzz Problem" by a friend today, who said it's an interview question for coding jobs.

I know basically shit all and was able to do it in 9 lines pretty quickly. I'm pretty sure you can do it in 1 but I don't know enough yet to do so. It concerns me if this is actually a job interview question, unless getting it to 1 line is the point and is significantly more complicated.

I know a couple folks here cautioned against bootcamps, but I ended up signing up for a local one that has a good relationship with the hiring managers in town (Over a 90% hire-rate, going by linked-in). I haven't interviewed for a job in over 6 years, so I figure the job-search help part of the bootcamp will be worthwhile, and the class portion should help me focus a bit more than "grab random Udemy courses," which is what I've been doing so far.
Fizzbuzz is pretty basic. Wait till they have you do graphing algos and pull retarded made up shit out of their ass like "H trees"
 
  • 1Potato
Reactions: 1 user

Neranja

<Bronze Donator>
2,605
4,143
unless getting it to 1 line is the point and is significantly more complicated.
I will let you in on some knowledge that is somehow not clearly communicated, but is pretty important to understand for you to succeed in coding jobs, and maybe IT in general.

First, a lemma: Companies (and their managers) really hate it when you are the only one who is able to do something they need done, and they can't replace you with someone else to do your job.

The rest is the obvious conclusion: The goal is to write code that is maintainable and easy to understand, so a different programmer can take over. This is also known as the bus factor.

If you write the solution to the Fizzbuzz problem like you are the running champion in an obfuscated code contest: this will instantly raise flags. Because at the end of the day you are working as a team, and that needs communication. In a lot of ways. Code comments and artefacts are a way of communicating with either a) a different programmer or b) the you in the future who forgot how he even got there.

Would you hire someone that wrote Python code like that?
Python:
import sys

z,x,y= "}{|}A|k{|kA|}=BE1)|BF}))|$}:~pI~/;@Go{H%{&A?|if }:~pJ"\
       "IJ-1~#>=0:GoAG@HG;o{G;%-I&{?|m,kJ,j=C?;/@~o{~D:Gl[c]("\
       ")?","G$p:%~;%~;el!]':p%break~;![':p%#<len(j):~%\n\t\t"\
       "%if c=='%while o%\n%m[k]%+=1%\t%if not %c=j[o]%-=1%sy"\
       "s.std%[0]*64000,0,0,open(sys.argv[1]).read()%if l.has"\
       "_key(c)%in.read(%out.write(chr(%=1%,o".split('%'),"HG"\
       "&%/~!#?}{;$@ABCDEFIJ"

for i in range(len(x)):z=z.replace(y[i],x[i])
z=z.split('|')
for o in range(9):
    exec("def %c():\n\tglobal k,m,o,j\n\t%s\n"%(chr(97+o),z[o]))
l={'>':c,'<':d,'-': b,'+':a,',':e,'.':f,'[':g,']':h}
i()
The solution to what it does is here.
 
  • 1Like
Reactions: 1 user

The_Black_Log Foler

Stock Pals Senior Vice President
<Gold Donor>
43,755
40,677
I will let you in on some knowledge that is somehow not clearly communicated, but is pretty important to understand for you to succeed in coding jobs, and maybe IT in general.

First, a lemma: Companies (and their managers) really hate it when you are the only one who is able to do something they need done, and they can't replace you with someone else to do your job.

The rest is the obvious conclusion: The goal is to write code that is maintainable and easy to understand, so a different programmer can take over. This is also known as the bus factor.

If you write the solution to the Fizzbuzz problem like you are the running champion in an obfuscated code contest: this will instantly raise flags. Because at the end of the day you are working as a team, and that needs communication. In a lot of ways. Code comments and artefacts are a way of communicating with either a) a different programmer or b) the you in the future who forgot how he even got there.

Would you hire someone that wrote Python code like that?
Python:
import sys

z,x,y= "}{|}A|k{|kA|}=BE1)|BF}))|$}:~pI~/;@Go{H%{&A?|if }:~pJ"\
       "IJ-1~#>=0:GoAG@HG;o{G;%-I&{?|m,kJ,j=C?;/@~o{~D:Gl[c]("\
       ")?","G$p:%~;%~;el!]':p%break~;![':p%#<len(j):~%\n\t\t"\
       "%if c=='%while o%\n%m[k]%+=1%\t%if not %c=j[o]%-=1%sy"\
       "s.std%[0]*64000,0,0,open(sys.argv[1]).read()%if l.has"\
       "_key(c)%in.read(%out.write(chr(%=1%,o".split('%'),"HG"\
       "&%/~!#?}{;$@ABCDEFIJ"

for i in range(len(x)):z=z.replace(y[i],x[i])
z=z.split('|')
for o in range(9):
    exec("def %c():\n\tglobal k,m,o,j\n\t%s\n"%(chr(97+o),z[o]))
l={'>':c,'<':d,'-': b,'+':a,',':e,'.':f,'[':g,']':h}
i()
The solution to what it does is here.
This. Write the code so people can understand it during the hiring process. Then once hired slowly obfuscate your code to ensure job security. This is the way.
 
  • 2Worf
  • 1Double Worf
Reactions: 2 users

Asshat wormie

2023 Asshat Award Winner
<Gold Donor>
16,820
30,964
I will let you in on some knowledge that is somehow not clearly communicated, but is pretty important to understand for you to succeed in coding jobs, and maybe IT in general.

First, a lemma: Companies (and their managers) really hate it when you are the only one who is able to do something they need done, and they can't replace you with someone else to do your job.

The rest is the obvious conclusion: The goal is to write code that is maintainable and easy to understand, so a different programmer can take over. This is also known as the bus factor.

If you write the solution to the Fizzbuzz problem like you are the running champion in an obfuscated code contest: this will instantly raise flags. Because at the end of the day you are working as a team, and that needs communication. In a lot of ways. Code comments and artefacts are a way of communicating with either a) a different programmer or b) the you in the future who forgot how he even got there.

Would you hire someone that wrote Python code like that?
Python:
import sys

z,x,y= "}{|}A|k{|kA|}=BE1)|BF}))|$}:~pI~/;@Go{H%{&A?|if }:~pJ"\
       "IJ-1~#>=0:GoAG@HG;o{G;%-I&{?|m,kJ,j=C?;/@~o{~D:Gl[c]("\
       ")?","G$p:%~;%~;el!]':p%break~;![':p%#<len(j):~%\n\t\t"\
       "%if c=='%while o%\n%m[k]%+=1%\t%if not %c=j[o]%-=1%sy"\
       "s.std%[0]*64000,0,0,open(sys.argv[1]).read()%if l.has"\
       "_key(c)%in.read(%out.write(chr(%=1%,o".split('%'),"HG"\
       "&%/~!#?}{;$@ABCDEFIJ"

for i in range(len(x)):z=z.replace(y[i],x[i])
z=z.split('|')
for o in range(9):
    exec("def %c():\n\tglobal k,m,o,j\n\t%s\n"%(chr(97+o),z[o]))
l={'>':c,'<':d,'-': b,'+':a,',':e,'.':f,'[':g,']':h}
i()
The solution to what it does is here.
Only thing that bothers me about this is the lack of spaces around the assignment operators.
 
  • 1Worf
Reactions: 1 user

Mist

Eeyore Enthusiast
<Gold Donor>
30,410
22,190
Was introduced to the "Fizzbuzz Problem" by a friend today, who said it's an interview question for coding jobs.
That's a real problem that takes more than 10 minutes for anyone that passed procedural programming 101 to write?

I've literally never gotten a single coding interview, despite having like 60+ credits in programming. I've done plenty of programming as part of other IT jobs but never even gotten to sit down for a coding interview.
 

TJT

Mr. Poopybutthole
<Gold Donor>
40,938
102,750
Be glad. They suck dick and are also stupid as fuck.

I've bitched about it a lot in the Job Hunt thread. My favorite was whiteboarding fucking python for a job that was exclusively in C and I told them that.They agreed and still thought it was important to be good at python with correct syntax.
 
  • 1Worf
Reactions: 1 user

Ao-

¯\_(ツ)_/¯
<WoW Guild Officer>
7,879
507
Be glad. They suck dick and are also stupid as fuck.

I've bitched about it a lot in the Job Hunt thread. My favorite was whiteboarding fucking python for a job that was exclusively in C and I told them that.They agreed and still thought it was important to be good at python with correct syntax.
Gotta use python to write the C for you
 

Chris

Potato del Grande
18,206
-336
Hi guys I'm looking to be pointing in the right direction on something.

I've been teaching myself HTML/CSS/Javascript the last few years to make my own website. I did programming at university but no web stuff or databases, it was mostly 3D graphics.

So I have a website for teachers and students. Students do math problems on my website and their progress is saved on a cookie, which limits them to the same machine/browser.

I need an account system where students can log into their account and retrieve the string in the cookie that stores their data, the storage format can change if needed though. Teachers need to be able to log in and see their students data.

So I'm just looking for someone to point me towards a good tutorial on setting up an account system and an indication of how long it will take to make it. I'm looking right now and there's too much choice, I don't want to start a tutorial on a system that can't have the features I need.
 

Neranja

<Bronze Donator>
2,605
4,143
So I'm just looking for someone to point me towards a good tutorial on setting up an account system and an indication of how long it will take to make it.
You first need to figure out your backend technology stack. There are tons of them, and you need to choose one your hoster supports and a language you are comfortable in. Plus for some languages there are multiple frameworks to choose from, each with different goals, strenghts and limitations. On top of my head:

- PHP + any Database
- Python/Django + any Database (If you go full framework ahead)
- Python/Flask + Plugins you need + any Database (if you go more towards minimalism)
- Node.js + Mongo if you can neither handle two languages at once nor understand what this "Relational Database Model" is all about
- Java - there are tons of ways, like JSP, Servlets, JEXL
- ASP, ASP.NET or ASP.NET Core (there are multiple flavors) if you are a Microsoft shop
- Go if you like building big fat binaries you can roll around and live in
- Ruby if you want Rails that badly
- Groovy/Grails if you want Rails, but also want a Java Virtual Machine

If you don't know the difference between the Boyce Codd Normal Form and the Backus-Naur Form look for something simple that will either manage your SQL database with an object-relational mapper (Java, Rails) or use a simpler storage like MongoDB.
 
  • 1Like
Reactions: 1 user

Chris

Potato del Grande
18,206
-336
You first need to figure out your backend technology stack. There are tons of them, and you need to choose one your hoster supports and a language you are comfortable in. Plus for some languages there are multiple frameworks to choose from, each with different goals, strenghts and limitations. On top of my head:

- PHP + any Database
- Python/Django + any Database (If you go full framework ahead)
- Python/Flask + Plugins you need + any Database (if you go more towards minimalism)
- Node.js + Mongo if you can neither handle two languages at once nor understand what this "Relational Database Model" is all about
- Java - there are tons of ways, like JSP, Servlets, JEXL
- ASP, ASP.NET or ASP.NET Core (there are multiple flavors) if you are a Microsoft shop
- Go if you like building big fat binaries you can roll around and live in
- Ruby if you want Rails that badly
- Groovy/Grails if you want Rails, but also want a Java Virtual Machine

If you don't know the difference between the Boyce Codd Normal Form and the Backus-Naur Form look for something simple that will either manage your SQL database with an object-relational mapper (Java, Rails) or use a simpler storage like MongoDB.
Yeah I didn't understand any of that. Thanks for much for the information though. I guess PHP/SQL would be the way to go as GoDaddy supports that.

I actually just had someone offer to fund all this backend stuff and marketing for 40% of the website. Since my revenue is £7 in GoogleAds I may just accept if it's going to be two more programming languages and lots of time to get this done.
 
  • 1Like
Reactions: 1 user

ShakyJake

<Donor>
7,627
19,254
So I'm just looking for someone to point me towards a good tutorial on setting up an account system and an indication of how long it will take to make it. I'm looking right now and there's too much choice, I don't want to start a tutorial on a system that can't have the features I need.
Take a look at this one:

Using Vue with ASP.NET Core By Example

I bought this course a year or so ago and it's pretty good. It's everything you need to know from front-end to back-end to build a website w/authentication. Since you already have some knowledge I'm thinking adapting to Vue.js shouldn't be a huge deal. It's by far the easiest client-side framework to learn.

I really recommend going with Microsoft .NET since it includes everything you need, is rock solid, and the tooling is top notch.

Also, I really like Shawn Wildermuth. Our company used to pay for a Pluralsight license and he was probably my favorite instructor on that platform.